package com.bringway.p2p.controller;

import java.net.URLDecoder;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.commons.collections.MapUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.bringway.framework.controller.JsonController;
import com.bringway.framework.util.RequestUtils;
import com.bringway.global.domain.SysUserDetails;
import com.bringway.global.service.MenuService;
import com.bringway.p2p.dao.P2PCustomerDao;
import com.bringway.p2p.dao.P2pDbhkDao;
import com.bringway.p2p.service.AppRootService;
import com.bringway.p2p.service.BankcardService;
import com.bringway.p2p.service.CjjgService;
import com.bringway.p2p.service.CzService;
import com.bringway.p2p.service.DkService;
import com.bringway.p2p.service.GrsyService;
import com.bringway.p2p.service.JhnhkService;
import com.bringway.p2p.service.JhnxmService;
import com.bringway.p2p.service.JkglService;
import com.bringway.p2p.service.JkxxService;
import com.bringway.p2p.service.MenuCUDService;
import com.bringway.p2p.service.OpinfoService;
import com.bringway.p2p.service.P2PCustomerService;
import com.bringway.p2p.service.P2PGrtzzqService;
import com.bringway.p2p.service.P2PHBService;
import com.bringway.p2p.service.P2PJhntzxiService;
import com.bringway.p2p.service.P2PUserService;
import com.bringway.p2p.service.P2pDbhkService;
import com.bringway.p2p.service.P2pWdzrService;
import com.bringway.p2p.service.P2pYwyService;
import com.bringway.p2p.service.SecurityService;
import com.bringway.p2p.service.SmrzjlService;
import com.bringway.p2p.service.TgsyService;
import com.bringway.p2p.service.TjbbService;
import com.bringway.p2p.service.TjrService;
import com.bringway.p2p.service.TxService;
import com.bringway.p2p.service.UserdzService;
import com.bringway.p2p.service.VipService;
import com.bringway.p2p.service.XtdlrzService;
import com.bringway.p2p.service.YcxiService;
import com.bringway.p2p.service.YzmService;
import com.bringway.p2p.service.ZctztjService;
import com.bringway.p2p.service.ZqshcgService;
import com.bringway.p2p.service.ZqsyService;
import com.bringway.p2p.service.ZqzrService;
import com.bringway.p2p.service.ZqzrlbService;
import com.bringway.p2p.util.Des;
import com.bringway.p2p.util.MsgUtils;

import net.sf.json.JSONObject;


@Controller
@RequestMapping("/p2p_app")
public class P2pAppsController extends JsonController {
	
	Logger logger = Logger.getLogger(P2pAppsController.class); 
	
	
	/**
	 * 获得app传入的参数
	 * */
	public Map<String,String> getContentMap(String decodeContent){
		Map<String,String> map = new HashMap<String,String>();
		String[] contents = decodeContent.split("&");
		for(int i=0; i<contents.length && StringUtils.isNotEmpty(decodeContent); i++){
			String[] param = contents[i].split("=");
			if(null != param && param.length == 2){
				map.put(param[0], contents[i].split("=")[1]);
			}else{
				map.put(param[0], "");
			}
		}
		return map;
	}

	
	/**
	 * 登录接口
	 * @param 返回数据结果集
	 * @param response 相应请求客户端
	 * @return 返回查询的数据
	 * @throws Exception
	 */
	@Autowired
	private MenuCUDService menuCudService;
	@Autowired
	private P2PUserService userService;
	@Autowired
	private AppRootService appRootService;
	@Autowired
	private P2PUserService p2pUserService;
	@RequestMapping("login_app")
	public List<String> login_app(HttpServletRequest request,HttpServletResponse response) throws Exception{
		logger.info("login_app 初始化登录接口!!!");
		Des des = new Des();//获取加密类
		JSONObject result = new JSONObject();//获取json
		List<Map<String, Object>> treeList=null;
		Map<String,String> map = new HashMap<String,String>();
		Map<String,Object> resmap = new HashMap<String,Object>();
		try
		{
			String content = RequestUtils.getStringParameter(request, "content");
			String decodeContent = des.decrypt(content);
			String uContent = new String(decodeContent.getBytes(),"UTF-8");
			decodeContent = URLDecoder.decode(uContent, "UTF-8");
			logger.info("login_app decodeContent is : " + decodeContent);
			String[] contents = decodeContent.split("&");
			if(contents != null && contents.length > 0){
				map = this.getContentMap(decodeContent);
				logger.info("userId is : " + map.get("userId"));
				logger.info("password is : " + map.get("password"));
				if(map.containsKey("userId")&&map.containsKey("password")){
					JSONObject params = new JSONObject();
					params.put("username", map.get("userId"));
					params.put("password", map.get("password"));
					boolean isValidAppUser=appRootService.queryGyh(params);
					if (isValidAppUser) {
						Map<String,Object> loginInfos = userService.login(params);
						String res=(boolean)loginInfos.get("isLogin")?"0":"1";
						resmap.put("res", res);
						resmap.put("msg", loginInfos.get("msg"));
						if ((boolean)loginInfos.get("isLogin")) {
							treeList=menuCudService.queryTreeMenuList(params);
							resmap.put("tree", treeList);
							//ios 返回数据 开始
							resmap.put("userInfo", map);
							SysUserDetails sysUserDetails =	p2pUserService.login(map.get("userId"));
							JSONObject paramsIos=new JSONObject();
							paramsIos.put("nodeId", "-1");
							paramsIos.put("roleId", sysUserDetails.getRoleId());
							paramsIos.put("gyh", sysUserDetails.getGyh());
							paramsIos.put("id", sysUserDetails.getId());
							//一级菜单
							Map<String, Map<String,Object>> menuMap=this.queryMenuList(paramsIos);
							List<Map<String, Object>> list=new ArrayList<>();
							for (Map.Entry<String, Map<String, Object>> map2:menuMap.entrySet()) {
								List<Map<String, Object>> list2=new ArrayList<>();
								if (MapUtils.getInteger(map2.getValue(), "CHILDCT")>0) {
									//二级菜单
									paramsIos.put("nodeId", map2.getKey());
									Map<String, Map<String,Object>> itemsMap=this.queryMenuList(paramsIos);
									for (Map.Entry<String, Map<String, Object>> map3 : itemsMap.entrySet()) {
										if (MapUtils.getInteger(map3.getValue(), "CHILDCT")>0) {
											//三级菜单
											paramsIos.put("nodeId", map3.getKey());
											Map<String, Map<String,Object>> itemsMap2=this.queryMenuList(paramsIos);
											for (Map.Entry<String, Map<String, Object>> map4 : itemsMap2.entrySet()) {
												list2.add(map4.getValue());
											}
										}else {
											list2.add(map3.getValue());
										}
									}
								}else{
									Map<String, Object> map5=new HashMap<>();
									for (Map.Entry<String, Object> map6:map2.getValue().entrySet()) {
										map5.put(map6.getKey(), map6.getValue());
									}
									list2.add(map5);
								}
								map2.getValue().put("items", list2);
								list.add(map2.getValue());
							}
							resmap.put("menu", list);
							//ios 返回数据 结束
						}
					}else {
						resmap.put("res", "1");
						resmap.put("msg", "您没有APP登录权限!");
					}
				}else{
					resmap.put("res", "1");
					resmap.put("msg", "操作有误，请重新操作！");
				}
			}else{
				resmap.put("res", "1");
				resmap.put("msg", "账号密码不正确!");
			}
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
		jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
			
		}catch(Exception ex){
			logger.error(ex.getMessage());
			resmap.put("res", "1");
			resmap.put("msg", "获取app登录接口信息失败!");
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}
		logger.info(result);
		serializeToJson(request, response, result);
		return null; 
	}
	@Autowired
	private YzmService yzmService;
	/**
	 * @作者 js  
	 * @方法名 getYzm_app  
	 * @功能 TODO 登陆获取验证码
	 * @param request
	 * @param response
	 * @return
	 * @throws Exception
	 */
	@RequestMapping("getYzm_app")
	public String getYzm_app(HttpServletRequest request,HttpServletResponse response) throws Exception {
		logger.info("getYzm_app 初始化获取验证码接口");
		String content =  RequestUtils.getStringParameter(request, "content");
		Des des = new Des();//获取加密解密类
		JSONObject result = new JSONObject();//获取json
		Map<String,String> map = new HashMap<String,String>();
		Map<String,Object> resmap = new HashMap<String,Object>();
		try{
			String decodeContent = des.decrypt(content);
			String uContent = new String(decodeContent.getBytes(),"UTF-8");
			decodeContent = URLDecoder.decode(uContent, "UTF-8");
			logger.info("getYzm_app decodeContent is : " + decodeContent);
			String[] contents = decodeContent.split("&");
			if(contents != null && contents.length > 0){
				map = this.getContentMap(decodeContent);
				if (map.containsKey("userId")) {
					String gyh=MapUtils.getString(map, "userId");
					String sjhm=this.yzmService.getSjhmByGyh(gyh);
					if (StringUtils.isNotBlank(sjhm)) {
						boolean isGetYzm=this.yzmService.getYzmCount(sjhm, "1");
						if (isGetYzm) {
							resmap.put("res", "1");
							resmap.put("msg", "获取验证码至少需间隔1分钟!");
						} else {
							String yzm=this.yzmService.getRandNum(6);
							String sms = yzm + "，工作人员不会向您索要，请勿向任何人泄露。";
							String sign = "红点e贷";
							boolean flag=this.yzmService.insertYzm(sjhm, yzm, "1");
							if (flag) {
								String inputline = MsgUtils.fsdx(sms, sign, sjhm);
								// 返回结果为‘0，20140009090990,1，提交成功’ 发送成功 具体见说明文档
								logger.info("返回字符串 : " + inputline);
								boolean isSuc=inputline.split(",")[0].equals("0")&& (inputline.contains("提交成功") || inputline.contains("鎻愪氦鎴愬姛"));
								if (isSuc) {
									resmap.put("res", "0");
									resmap.put("msg", "发送成功!");
								}else {
									resmap.put("res", "1");
									resmap.put("msg", "发送失败!");
								}
							} else {
								resmap.put("res", "1");
								resmap.put("msg", "发送失败!");
							}
						}
					} else {
						resmap.put("res", "1");
						resmap.put("msg", "未设置手机号码!");
					}
				}else {
					resmap.put("res", "1");
					resmap.put("msg", "参数不正确!");
				}
			}else{
				resmap.put("res", "1");
				resmap.put("msg", "参数不正确!");
			}
			String jsonStr = JSONObject.fromObject(resmap).toString();
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}catch(Exception ex){
			logger.error(ex.getMessage());
			resmap.put("res", "1");
			resmap.put("msg", "获取验证码 失败!");
			String jsonStr = JSONObject.fromObject(resmap).toString();
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}
		logger.info(result);
		serializeToJson(request, response, result);
		return null;
	}
	/**
	 * @作者 js  
	 * @方法名 verifyYzm_app  
	 * @功能 TODO 
	 * @param request
	 * @param response
	 * @return
	 * @throws Exception
	 */
	/**
	 * @作者 js  
	 * @方法名 verifyYzm_app  
	 * @功能 TODO 登陆验证码 验证
	 * @param request
	 * @param response
	 * @return
	 * @throws Exception
	 */
	@RequestMapping("verifyYzm_app")
	public String verifyYzm_app(HttpServletRequest request,HttpServletResponse response) throws Exception {
		logger.info("getYzm_app 初始化获取验证码接口");
		String content =  RequestUtils.getStringParameter(request, "content");
		Des des = new Des();//获取加密解密类
		JSONObject result = new JSONObject();//获取json
		Map<String,String> map = new HashMap<String,String>();
		Map<String,Object> resmap = new HashMap<String,Object>();
		try{
			String decodeContent = des.decrypt(content);
			String uContent = new String(decodeContent.getBytes(),"UTF-8");
			decodeContent = URLDecoder.decode(uContent, "UTF-8");
			logger.info("getYzm_app decodeContent is : " + decodeContent);
			String[] contents = decodeContent.split("&");
			if(contents != null && contents.length > 0){
				map = this.getContentMap(decodeContent);
				if (map.containsKey("userId")&&map.containsKey("yzm")) {
					String yzm=MapUtils.getString(map, "yzm");
					String gyh=MapUtils.getString(map, "userId");
					String sjhm=this.yzmService.getSjhmByGyh(gyh);
					if (StringUtils.isNotBlank(sjhm)) {
						boolean isEffectiveYzm=this.yzmService.isEffectiveYzm(sjhm, yzm, "1");
						if (isEffectiveYzm) {
							boolean verifyYzm=this.yzmService.verifyYzm(sjhm, yzm, "1");
							if (verifyYzm) {
								resmap.put("res", "0");
								resmap.put("msg", "验证码验证成功!");
							} else {
								resmap.put("res", "1");
								resmap.put("msg", "验证码不正确!");
							}
						} else {
							resmap.put("res", "1");
							resmap.put("msg", "验证码已超时!");
						}
					} else {
						resmap.put("res", "1");
						resmap.put("msg", "未设置手机号码!");
					}
				}else {
					resmap.put("res", "1");
					resmap.put("msg", "参数不正确!");
				}
			}else{
				resmap.put("res", "1");
				resmap.put("msg", "参数不正确!");
			}
			String jsonStr = JSONObject.fromObject(resmap).toString();
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}catch(Exception ex){
			logger.error(ex.getMessage());
			resmap.put("res", "1");
			resmap.put("msg", "验证码不正确!");
			String jsonStr = JSONObject.fromObject(resmap).toString();
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}
		logger.info(result);
		serializeToJson(request, response, result);
		return null;
	}
	@Autowired
	private MenuService menuService;
	private Map<String, Map<String,Object>> queryMenuList(JSONObject params) {
		Map<String, Map<String,Object>> mapByUserId = new HashMap<String, Map<String,Object>>();
		Map<String, Map<String,Object>> menuMap = new HashMap<String, Map<String,Object>>();
		List<Map<String, Object>> list=new ArrayList<>();
		menuMap = menuService.listMenuByRole(params);
		mapByUserId = menuService.listMenuByParent01(params);
		menuMap.putAll(mapByUserId);
		return menuMap;
	}


	/**
	 * 每日数据统计/ 
	 * @param 返回数据结果集
	 * @param response 相应请求给客户端
	 * @return 返回查询的数据
	 * @throws Exception
	 */
	@Autowired
	private ZctztjService zctztjService;
	@RequestMapping("everydayRegister_app")
	public String everydayRegister_app(HttpServletRequest request,HttpServletResponse response) throws Exception{
		logger.info("everydayRegister_app 初始化注册信息接口!!!");
		String content =  RequestUtils.getStringParameter(request, "content");
		Des des = new Des();//获取加密解密类
		JSONObject result = new JSONObject();//获取json
		Map<String,String> map = new HashMap<String,String>();
		Map<String,Object> resmap = new HashMap<String,Object>();
		try
		{
			String decodeContent = des.decrypt(content);
			String uContent = new String(decodeContent.getBytes(),"UTF-8");
			decodeContent = URLDecoder.decode(uContent, "UTF-8");
			logger.info("everydayRegister_app decodeContent is : " + decodeContent);
			String[] contents = decodeContent.split("&");
			if(contents != null && contents.length > 0){
				
				map = this.getContentMap(decodeContent);
				logger.info("map decodeContent is : " + map.toString());
				JSONObject params = new JSONObject();
				String pageNum= map.get("pageNum");
				String pageSize= map.get("pageSize");
				int start=0;
				int limit=0;
				if (StringUtils.isNotEmpty(pageNum)&& StringUtils.isNotEmpty(pageSize)) {
					start=(Integer.valueOf(pageNum)-1)*Integer.valueOf(pageSize);
					limit=Integer.valueOf(pageSize);
				}
				params.put("start", start);
				params.put("limit", limit);
				params.put("startDate",  map.get("startDate"));
				params.put("endDate",  map.get("endDate"));
				List<Map<String, Object>> list = zctztjService.queryZctztjList(params);
				List<Map<String, Object>> list2=new ArrayList<>();
				int i=start+1;
				for (Map<String, Object> map2 : list) {
					map2.put("ORDER", i);
					list2.add(map2);
					i++;
				}
				int count = zctztjService.getZctztjCount(params);
				
				resmap.put("data", list2);	
				resmap.put("total", count);
				resmap.put("res", "0");
				resmap.put("msg", "查询成功！");
			}else{
				resmap.put("res", "1");
				resmap.put("msg", "参数不正确!");
			}
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}catch(Exception ex){
			logger.error(ex.getMessage());
			resmap.put("res", "1");
			resmap.put("msg", "获取每日数据统计接口失败!");
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}
		logger.info(result);
		serializeToJson(request, response, result);
		return null;
	}

	
	/**
	 * 每日数据统计详细查看
	 * @param 返回数据结果集
	 * @param response 相应请求给客户端
	 * @return 返回查询的数据
	 * @throws Exception
	 */
	
	@RequestMapping("everydayRead_app")
	public String everydayRead_app(HttpServletRequest request,HttpServletResponse response) throws Exception{
		logger.info("everydayRead_app 初始化查看接口!!!");
		String content =  RequestUtils.getStringParameter(request, "content");
		Des des = new Des();//获取加密类
		JSONObject result = new JSONObject();//获取json
		Map<String,String> map = new HashMap<String,String>();
		Map<String,Object> resmap = new HashMap<String,Object>();
		try
		{
			String decodeContent = des.decrypt(content);
			String uContent = new String(decodeContent.getBytes(),"UTF-8");
			decodeContent = URLDecoder.decode(uContent, "UTF-8");
			logger.info("everydayRead_app decodeContent is : " + decodeContent);
			String[] contents = decodeContent.split("&");
			
			if(contents != null && contents.length > 0){
				
				map = this.getContentMap(decodeContent);
				logger.info("map decodeContent is : " + map.toString());
				JSONObject params = new JSONObject();
				String pageNum= map.get("pageNum");
				String pageSize= map.get("pageSize");
				String tzsj= map.get("tzsj");
				int start=0;
				int limit=0;
				if (StringUtils.isNotEmpty(pageNum)&& StringUtils.isNotEmpty(pageSize)) {
					start=(Integer.valueOf(pageNum)-1)*Integer.valueOf(pageSize);
					limit=Integer.valueOf(pageSize);
				}
				params.put("start", start);
				params.put("limit", limit);
				params.put("tzsj", tzsj);
				List<Map<String, Object>> list = zctztjService.queryGrtz(params);
				List<Map<String, Object>> list2=new ArrayList<>();
				int i=start+1;
				for (Map<String, Object> map2 : list) {
					map2.put("ORDER", i);
					list2.add(map2);
					i++;
				}
				int count = zctztjService.getZctztjCount(params);
				
				resmap.put("data", list2);	
				resmap.put("total", count);
				resmap.put("res", "0");
				resmap.put("msg", "查询成功！");
			}else{
				resmap.put("res", "1");
				resmap.put("msg", "参数不正确!");
			}

			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
		jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}catch(Exception ex){
			logger.error(ex.getMessage());
			resmap.put("res", "1");
			resmap.put("msg", "获取查看接口失败!");
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}
		logger.info(result);
		serializeToJson(request, response, result);
		return null;
	
	}

	
	
	/*
	 * app操作日
	 * @param 返回数据结果集
	 * @param response 相应请求给客户端
	 * @return 返回查询的数据
	 * @throws Exception
	 */
	@Autowired
	private OpinfoService opinfoService;
	@RequestMapping("operation_app")
	public String operation_app(HttpServletRequest request,HttpServletResponse response) throws Exception{
		logger.info("operation_app 初始化app 操作接口!!!");
		String content =  RequestUtils.getStringParameter(request, "content");
		Des des = new Des();//获取加密类
		JSONObject result = new JSONObject();//获取json
		Map<String,String> map = new HashMap<String,String>();
		Map<String,Object> resmap = new HashMap<String,Object>();
		try
		{
			String decodeContent = des.decrypt(content);
			String uContent = new String(decodeContent.getBytes(),"UTF-8");
			decodeContent = URLDecoder.decode(uContent, "UTF-8");
			logger.info("operation_app decodeContent is : " + decodeContent);
			String[] contents = decodeContent.split("&");
            if(contents != null && contents.length > 0){
				
				map = this.getContentMap(decodeContent);
				logger.info("map decodeContent is : " + map.toString());
				JSONObject params = new JSONObject();
				String pageNum= map.get("pageNum");
				String pageSize= map.get("pageSize");
				int start=0;
				int limit=0;
				if (StringUtils.isNotEmpty(pageNum)&& StringUtils.isNotEmpty(pageSize)) {
					start=(Integer.valueOf(pageNum)-1)*Integer.valueOf(pageSize);
					limit=Integer.valueOf(pageSize);
				}
				params.put("start", start);
				params.put("limit", limit);
				params.put("START_DATE",  map.get("startDate"));
				params.put("END_DATE",  map.get("endDate"));
				params.put("USER_NAME",  map.get("username"));
				params.put("DEVICE_TYPE", map.get("deviceType"));
				params.put("DEVICE_CITY_CODE",map.get("deviceCityCode"));
				params.put("DEVICE_OPER_TYPE", map.get("deviceOperType"));
				
				List<Map<String, Object>> list =opinfoService.queryOpinfoList(params);
				List<Map<String, Object>> list2=new ArrayList<>();
				int i=start+1;
				for (Map<String, Object> map2 : list) {
					map2.put("ORDER", i);
					list2.add(map2);
					i++;
				}
				int count = opinfoService.getOpinfoCount(params);
				resmap.put("data", list2);	
				resmap.put("total", count);
				resmap.put("res", "0");
				resmap.put("msg", "查询成功！");
			}else{
				resmap.put("res", "1");
				resmap.put("msg", "参数不正确!");
			}


			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
		jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}catch(Exception ex){
			logger.error(ex.getMessage());
			resmap.put("res", "1");
			resmap.put("msg", "获取app 操作接口失败!");
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}
		logger.info(result);
		serializeToJson(request, response, result);
		return null;
	
	}
	
	
	
	/**
	 *系统登录日志
	 * @param 返回数据结果集
	 * @param response 相应请求给客户端
	 * @return 返回查询的数据
	 * @throws Exception
	 */
	@Autowired
	private XtdlrzService xtdlrzService;
	@RequestMapping("Xtdlrz_app")
	public String Xtdlrz_app(HttpServletRequest request,HttpServletResponse response) throws Exception{
		logger.info("Xtdlrz_app 初始化系统登录接口!!!");
		String content =  RequestUtils.getStringParameter(request, "content");
		Des des = new Des();//获取加密解密类
		JSONObject result = new JSONObject();//获取json
		Map<String,String> map = new HashMap<String,String>();
		Map<String,Object> resmap = new HashMap<String,Object>();
		try
		{
			String decodeContent = des.decrypt(content);
			String uContent = new String(decodeContent.getBytes(),"UTF-8");
			decodeContent = URLDecoder.decode(uContent, "UTF-8");
			logger.info("Xtdlrz_app decodeContent is : " + decodeContent);
			String[] contents = decodeContent.split("&");
			if(contents != null && contents.length > 0){
				
				map = this.getContentMap(decodeContent);
				logger.info("map decodeContent is : " + map.toString());
				JSONObject params = new JSONObject();
				String pageNum= map.get("pageNum");
				String pageSize= map.get("pageSize");
				String name= map.get("name");
				String sjhm= map.get("sjhm");
				int start=0;
				int limit=0;
				if (StringUtils.isNotEmpty(pageNum)&& StringUtils.isNotEmpty(pageSize)) {
					start=(Integer.valueOf(pageNum)-1)*Integer.valueOf(pageSize);
					limit=Integer.valueOf(pageSize);
				}
				params.put("start", start);
				params.put("limit", limit);
				params.put("name",name);
				params.put("sjhm",sjhm);
				List<Map<String, Object>> list = xtdlrzService.queryXtdlrzList(params);
				List<Map<String, Object>> list2=new ArrayList<>();
				int i=start+1;
				for (Map<String, Object> map2 : list) {
					map2.put("ORDER", i);
					list2.add(map2);
					i++;
				}
				int count = xtdlrzService.gettXtdlCount(params);
				
				resmap.put("data", list2);	
				resmap.put("total", count);
				resmap.put("res", "0");
				resmap.put("msg", "查询成功！");
			}else{
				resmap.put("res", "1");
				resmap.put("msg", "参数不正确!");
			}
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}catch(Exception ex){
			logger.error(ex.getMessage());
			resmap.put("res", "1");
			resmap.put("msg", "获取系统登录接口失败!");
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}
		logger.info(result);
		serializeToJson(request, response, result);
		return null;
	}


	/**
	 * 系统日志
	 * @param 返回数据结果集
	 * @param response 相应请求给客户端
	 * @return 返回查询的数据
	 * @throws Exception
	 */

	@Autowired
	private YcxiService ycxiService;
	@RequestMapping("Ycxi_app")
	public String Ycxi_app(HttpServletRequest request,HttpServletResponse response) throws Exception{
		logger.info("Ycxi_app 初始化系统异常信息接口!!!");
		String content =  RequestUtils.getStringParameter(request, "content");
		Des des = new Des();//获取加密解密类
		JSONObject result = new JSONObject();//获取json
		Map<String,String> map = new HashMap<String,String>();
		Map<String,Object> resmap = new HashMap<String,Object>();
		try
		{
			String decodeContent = des.decrypt(content);
			String uContent = new String(decodeContent.getBytes(),"UTF-8");
			decodeContent = URLDecoder.decode(uContent, "UTF-8");
			logger.info("Ycxi_app decodeContent is : " + decodeContent);
			String[] contents = decodeContent.split("&");
			if(contents != null && contents.length > 0){
				
				map = this.getContentMap(decodeContent);
				logger.info("map decodeContent is : " + map.toString());
				JSONObject params = new JSONObject();
				String pageNum= map.get("pageNum");
				String pageSize= map.get("pageSize");
				int start=0;
				int limit=0;
				if (StringUtils.isNotEmpty(pageNum)&& StringUtils.isNotEmpty(pageSize)) {
					start=(Integer.valueOf(pageNum)-1)*Integer.valueOf(pageSize);
					limit=Integer.valueOf(pageSize);
				}
				params.put("start", start);
				params.put("limit", limit);
				params.put("startDate",  map.get("startDate"));
				params.put("endDate",  map.get("endDate"));
				params.put("yhm",  map.get("yhm"));
				List<Map<String, Object>> list =ycxiService.queryYcxiList(params);
				List<Map<String, Object>> list2=new ArrayList<>();
				int i=start+1;
				for (Map<String, Object> map2 : list) {
					map2.put("ORDER", i);
					list2.add(map2);
					i++;
				}
				int count = ycxiService.gettYcCount(params);
				
				resmap.put("data", list2);	
				resmap.put("total", count);
				resmap.put("res", "0");
				resmap.put("msg", "查询成功！");
			}else{
				resmap.put("res", "1");
				resmap.put("msg", "参数不正确!");
			}
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}catch(Exception ex){
			logger.error(ex.getMessage());
			resmap.put("res", "1");
			resmap.put("msg", "获取系统异常信息接口失败!");
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}
		logger.info(result);
		serializeToJson(request, response, result);
		return null;
	}

	/**
	 * 业务员推荐信息统计
	 * @param 返回数据结果集
	 * @param response 相应请求给客户端
	 * @return 返回查询的数据
	 * @throws Exception
	 */

	@Autowired
	private P2pYwyService p2pYwyService;
	@RequestMapping("Ywytj_app")
	public String Ywytj_app(HttpServletRequest request,HttpServletResponse response) throws Exception{
		logger.info("Ycxi_app 初始化业务员推荐信息接口!!!");
		String content =  RequestUtils.getStringParameter(request, "content");
		Des des = new Des();//获取加密解密类
		JSONObject result = new JSONObject();//获取json
		Map<String,String> map = new HashMap<String,String>();
		Map<String,Object> resmap = new HashMap<String,Object>();
		try
		{
			String decodeContent = des.decrypt(content);
			String uContent = new String(decodeContent.getBytes(),"UTF-8");
			decodeContent = URLDecoder.decode(uContent, "UTF-8");
			logger.info("Ywytj_app decodeContent is : " + decodeContent);
			String[] contents = decodeContent.split("&");
			if(contents != null && contents.length > 0){
				
				map = this.getContentMap(decodeContent);
				logger.info("map decodeContent is : " + map.toString());
				JSONObject params = new JSONObject();
				String pageNum= map.get("pageNum");
				String pageSize= map.get("pageSize");
				String TJR= map.get("TJR");
				int start=0;
				int limit=0;
				if (StringUtils.isNotEmpty(pageNum)&& StringUtils.isNotEmpty(pageSize)) {
					start=(Integer.valueOf(pageNum)-1)*Integer.valueOf(pageSize);
					limit=Integer.valueOf(pageSize);
				}
				params.put("start", start);
				params.put("limit", limit);
				params.put("TJ_START",  map.get("startDate"));
				params.put("TJ_END",  map.get("endDate"));
				params.put("TJR",  TJR);
				List<Map<String, Object>> list =p2pYwyService.queryYwysstjList(params);
				List<Map<String, Object>> list2=new ArrayList<>();
				int i=start+1;
				for (Map<String, Object> map2 : list) {
					map2.put("ORDER", i);
					list2.add(map2);
					i++;
				}
				
				int count = p2pYwyService.getYwysstjCount(params);
				
				resmap.put("data", list2);	
				resmap.put("total", count);
				resmap.put("res", "0");
				resmap.put("msg", "查询成功！");
			}else{
				resmap.put("res", "1");
				resmap.put("msg", "参数不正确!");
			}
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}catch(Exception ex){
			logger.error(ex.getMessage());
			resmap.put("res", "1");
			resmap.put("msg", "获取业务员推荐信息接口失败!");
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}
		logger.info(result);
		serializeToJson(request, response, result);
		return null;
	}

/**
	 * 所属客户基本信息查询
	 * @param 返回数据结果集
	 * @param response 相应请求给客户端
	 * @return 返回查询的数据
	 * @throws Exception
	 */

	@Autowired
	private TjrService tjrService;
	@RequestMapping("Ssjb_app")
	public String Ssj_app(HttpServletRequest request,HttpServletResponse response) throws Exception{
		logger.info("Ssjb_app 初始化所属客户基本信息查询接口!!!");
		String content =  RequestUtils.getStringParameter(request, "content");
		Des des = new Des();//获取加密解密类
		JSONObject result = new JSONObject();//获取json
		Map<String,String> map = new HashMap<String,String>();
		Map<String,Object> resmap = new HashMap<String,Object>();
		try
		{
			String decodeContent = des.decrypt(content);
			String uContent = new String(decodeContent.getBytes(),"UTF-8");
			decodeContent = URLDecoder.decode(uContent, "UTF-8");
			logger.info("Ssjb_app decodeContent is : " + decodeContent);
			String[] contents = decodeContent.split("&");
			if(contents != null && contents.length > 0){
				map = this.getContentMap(decodeContent);
				logger.info("map decodeContent is : " + map.toString());
				JSONObject params = new JSONObject();
				String pageNum= map.get("pageNum");
				String pageSize= map.get("pageSize");
				
				int start=0;
				int limit=0;
				if (StringUtils.isNotEmpty(pageNum)&& StringUtils.isNotEmpty(pageSize)) {
					start=(Integer.valueOf(pageNum)-1)*Integer.valueOf(pageSize);
					limit=Integer.valueOf(pageSize);
				}
				params.put("start", start);
				params.put("limit", limit);
				params.put("regStartDate",  map.get("startDate"));
				params.put("regEndDate",  map.get("endDate"));
				params.put("user_name",map.get("user_name"));
				params.put("sjhm",map.get("sjhm"));
				params.put("realName",map.get("realName"));
				params.put("sfzNum",map.get("sfzNum"));
				List<Map<String, Object>> list = tjrService.querytjr(params);
				List<Map<String, Object>> list2=new ArrayList<>();
				int i=start+1;
				for (Map<String, Object> map2 : list) {
					map2.put("ORDER", i);
					list2.add(map2);
					i++;
				}
				int count = tjrService.gettjrCount(params);
				resmap.put("data", list2);	
				resmap.put("total", count);
				resmap.put("res", "0");
				resmap.put("msg", "查询成功！");
			}else{
				resmap.put("res", "1");
				resmap.put("msg", "参数不正确!");
			}
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}catch(Exception ex){
			logger.error(ex.getMessage());
			resmap.put("res", "1");
			resmap.put("msg", "获取所属客户基本信息查询失败!");
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}
		logger.info(result);
		serializeToJson(request, response, result);
		return null;
	}
	
	/**
	 * 所属客户交易信息查询/个人债权投资信息查询
	 * @param 返回数据结果集
	 * @param response 相应请求给客户端
	 * @return 返回查询的数据
	 * @throws Exception
	 */
	@Autowired
	private P2PGrtzzqService p2pGrtzzqService;
	@RequestMapping("Ssjy_app")
	public String Ssjy_app(HttpServletRequest request,HttpServletResponse response) throws Exception{
		logger.info("Ssjy_app 初始化所属客户交易信息查询接口!!!");
		String content =  RequestUtils.getStringParameter(request, "content");
		Des des = new Des();//获取加密解密类
		JSONObject result = new JSONObject();//获取json
		Map<String,String> map = new HashMap<String,String>();
		Map<String,Object> resmap = new HashMap<String,Object>();
		try
		{
			String decodeContent = des.decrypt(content);
			String uContent = new String(decodeContent.getBytes(),"UTF-8");
			decodeContent = URLDecoder.decode(uContent, "UTF-8");
			logger.info("Ssjy_app decodeContent is : " + decodeContent);
			String[] contents = decodeContent.split("&");
			if(contents != null && contents.length > 0){
				map = this.getContentMap(decodeContent);
				logger.info("map decodeContent is : " + map.toString());
				JSONObject params = new JSONObject();
				String pageNum= map.get("pageNum");
				String pageSize= map.get("pageSize");
				
				int start=0;
				int limit=0;
				if (StringUtils.isNotEmpty(pageNum)&& StringUtils.isNotEmpty(pageSize)) {
					start=(Integer.valueOf(pageNum)-1)*Integer.valueOf(pageSize);
					limit=Integer.valueOf(pageSize);
				}
				params.put("start", start);
				params.put("limit", limit);
				params.put("TZSJ_START",  map.get("TZSJ_START"));
				params.put("TZSJ_END",  map.get("TZSJ_END"));
				params.put("userId",map.get("userId"));
				params.put("SJHM",map.get("SJHM"));
				params.put("TCZT",map.get("TCZT"));
				params.put("HKZT",map.get("HKZT"));
				params.put("XMMC",map.get("XMMC"));
				params.put("TJR",map.get("TJR"));
				params.put("Q_HTBH",map.get("Q_HTBH"));
				params.put("Q_DQ",map.get("Q_DQ"));
				params.put("Q_BM",map.get("Q_BM"));
				params.put("Q_SS",map.get("Q_SS"));
				List<Map<String, Object>> list = p2pGrtzzqService.queryGrtzzq(params);
				List<Map<String, Object>> list2=new ArrayList<>();
				int i=start+1;
				for (Map<String, Object> map2 : list) {
					map2.put("ORDER", i);
					list2.add(map2);
					i++;
				}
				int count =p2pGrtzzqService.getPageCount(params);
				float sumJe=p2pGrtzzqService.getGrtzJe(params);
				resmap.put("sumJe", sumJe);	
				resmap.put("data", list2);	
				resmap.put("total", count);
				resmap.put("res", "0");
				resmap.put("msg", "查询成功！");
			}else{
				resmap.put("res", "1");
				resmap.put("msg", "参数不正确!");
			}
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}catch(Exception ex){
			logger.error(ex.getMessage());
			resmap.put("res", "1");
			resmap.put("msg", "获取所属客户交易信息查询失败!");
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}
		logger.info(result);
		serializeToJson(request, response, result);
		return null;
	}
	
	
	/**
	 *新债权转让发起申请
	 * @param 返回数据结果集
	 * @param response 相应请求给客户端
	 * @return 返回查询的数据
	 * @throws Exception
	 */
	
	@RequestMapping("Zqzrsq_app")
	public String Zqzrsq_app(HttpServletRequest request,HttpServletResponse response) throws Exception{
		logger.info("Zqzrsq_app 初始化*新债权转让发起申请接口!!!");
		String content =  RequestUtils.getStringParameter(request, "content");
		Des des = new Des();//获取加密解密类
		JSONObject result = new JSONObject();//获取json
		Map<String,String> map = new HashMap<String,String>();
		Map<String,Object> resmap = new HashMap<String,Object>();
		try
		{
			String decodeContent = des.decrypt(content);
			String uContent = new String(decodeContent.getBytes(),"UTF-8");
			decodeContent = URLDecoder.decode(uContent, "UTF-8");
			logger.info("Zqzrsq_app decodeContent is : " + decodeContent);
			String[] contents = decodeContent.split("&");
			if(contents != null && contents.length > 0){
				map = this.getContentMap(decodeContent);
				logger.info("map decodeContent is : " + map.toString());
				JSONObject params = new JSONObject();
				String pageNum= map.get("pageNum");
				String pageSize= map.get("pageSize");
				
				int start=0;
				int limit=0;
				if (StringUtils.isNotEmpty(pageNum)&& StringUtils.isNotEmpty(pageSize)) {
					start=(Integer.valueOf(pageNum)-1)*Integer.valueOf(pageSize);
					limit=Integer.valueOf(pageSize);
				}
				params.put("start", start);
				params.put("limit", limit);
				params.put("TZSJ_START",  map.get("TZSJ_START"));
				params.put("TZSJ_END",  map.get("TZSJ_END"));
				params.put("TCZT",map.get("TCZT"));
				params.put("HKZT",map.get("HKZT"));
				params.put("XMMC",map.get("XMMC"));
				params.put("TJR",map.get("TJR"));
				params.put("HTBH",map.get("HTBH"));
				List<Map<String, Object>> list = p2pGrtzzqService.queryGrtzzq(params);
				List<Map<String, Object>> list2=new ArrayList<>();
				int i=start+1;
				for (Map<String, Object> map2 : list) {
					map2.put("ORDER", i);
					list2.add(map2);
					i++;
				}
				int count =p2pGrtzzqService.getPageCount(params);
				resmap.put("data", list2);	
				resmap.put("total", count);
				resmap.put("res", "0");
				resmap.put("msg", "查询成功！");
			}else{
				resmap.put("res", "1");
				resmap.put("msg", "参数不正确!");
			}
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}catch(Exception ex){
			logger.error(ex.getMessage());
			resmap.put("res", "1");
			resmap.put("msg", "获取新债权转让发起申请接口失败!");
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}
		logger.info(result);
		serializeToJson(request, response, result);
		return null;
	}
	
	
	
	/**
	 * 新债权转让查询
	 * @param 返回数据结果集
	 * @param response 相应请求给客户端
	 * @return 返回查询的数据
	 * @throws Exception
	 */
	@Autowired
	private ZqzrService zqzrService;
	@RequestMapping("NewZqsearch_app")
	public String NewZqsearch_app(HttpServletRequest request,HttpServletResponse response) throws Exception{
		logger.info("NewZqsearch_app 初始化新债权转让查询接口!!!");
		String content =  RequestUtils.getStringParameter(request, "content");
		Des des = new Des();//获取加密解密类
		JSONObject result = new JSONObject();//获取json
		Map<String,String> map = new HashMap<String,String>();
		Map<String,Object> resmap = new HashMap<String,Object>();
		try
		{
			String decodeContent = des.decrypt(content);
			String uContent = new String(decodeContent.getBytes(),"UTF-8");
			decodeContent = URLDecoder.decode(uContent, "UTF-8");
			logger.info("NewZqsearch_app decodeContent is : " + decodeContent);
			String[] contents = decodeContent.split("&");
			if(contents != null && contents.length > 0){
				map = this.getContentMap(decodeContent);
				logger.info("map decodeContent is : " + map.toString());
				JSONObject params = new JSONObject();
				String pageNum= map.get("pageNum");
				String pageSize= map.get("pageSize");
				
				int start=0;
				int limit=0;
				if (StringUtils.isNotEmpty(pageNum)&& StringUtils.isNotEmpty(pageSize)) {
					start=(Integer.valueOf(pageNum)-1)*Integer.valueOf(pageSize);
					limit=Integer.valueOf(pageSize);
				}
				params.put("start", start);
				params.put("limit", limit);
				params.put("startDate",  map.get("startDate"));
				params.put("endDate",  map.get("endDate"));
				params.put("zrr",map.get("zrr"));
				params.put("zrzt",map.get("zrzt"));
				params.put("htbh",map.get("htbh"));
				params.put("srr",map.get("srr"));
				
				List<Map<String, Object>> list = zqzrService.queryZqzrlbList(params);
				List<Map<String, Object>> list2=new ArrayList<>();
				int i=start+1;
				for (Map<String, Object> map2 : list) {
					map2.put("ORDER", i);
					list2.add(map2);
					i++;
				}
				int count =zqzrService.getZqzrlbCount(params);
				resmap.put("data", list2);	
				resmap.put("total", count);
				resmap.put("res", "0");
				resmap.put("msg", "查询成功！");
			}else{
				resmap.put("res", "1");
				resmap.put("msg", "参数不正确!");
			}
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}catch(Exception ex){
			logger.error(ex.getMessage());
			resmap.put("res", "1");
			resmap.put("msg", "获取新债权转让查询接口失败!");
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}
		logger.info(result);
		serializeToJson(request, response, result);
		return null;
	}
	
	
	
	/**
	 * 新债权转让审核
	 * @param 返回数据结果集
	 * @param response 相应请求给客户端
	 * @return 返回查询的数据
	 * @throws Exception
	 */
	
	@RequestMapping("NewZqsh_app")
	public String NewZqsh_app(HttpServletRequest request,HttpServletResponse response) throws Exception{
		logger.info("NewZqsh_app 初始化新债权转让审核接口!!!");
		String content =  RequestUtils.getStringParameter(request, "content");
		Des des = new Des();//获取加密解密类
		JSONObject result = new JSONObject();//获取json
		Map<String,String> map = new HashMap<String,String>();
		Map<String,Object> resmap = new HashMap<String,Object>();
		try
		{
			String decodeContent = des.decrypt(content);
			String uContent = new String(decodeContent.getBytes(),"UTF-8");
			decodeContent = URLDecoder.decode(uContent, "UTF-8");
			logger.info("NewZqsh_app decodeContent is : " + decodeContent);
			String[] contents = decodeContent.split("&");
			if(contents != null && contents.length > 0){
				map = this.getContentMap(decodeContent);
				logger.info("map decodeContent is : " + map.toString());
				JSONObject params = new JSONObject();
				String pageNum= map.get("pageNum");
				String pageSize= map.get("pageSize");
				
				int start=0;
				int limit=0;
				if (StringUtils.isNotEmpty(pageNum)&& StringUtils.isNotEmpty(pageSize)) {
					start=(Integer.valueOf(pageNum)-1)*Integer.valueOf(pageSize);
					limit=Integer.valueOf(pageSize);
				}
				params.put("start", start);
				params.put("limit", limit);
				params.put("startDate",  map.get("startDate"));
				params.put("endDate",  map.get("endDate"));
				params.put("czrr",map.get("czrr"));
				params.put("cshr",map.get("cshr"));
				params.put("csqzt",map.get("csqzt"));
				
				List<Map<String, Object>> list = zqzrService.queryZqzrsqList(params);
				List<Map<String, Object>> list2=new ArrayList<>();
				int i=start+1;
				for (Map<String, Object> map2 : list) {
					map2.put("ORDER", i);
					list2.add(map2);
					i++;
				}
				int count =zqzrService.getZqzrsqCount(params);
				resmap.put("data", list2);	
				resmap.put("total", count);
				resmap.put("res", "0");
				resmap.put("msg", "查询成功！");
			}else{
				resmap.put("res", "1");
				resmap.put("msg", "参数不正确!");
			}
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}catch(Exception ex){
			logger.error(ex.getMessage());
			resmap.put("res", "1");
			resmap.put("msg", "获取新债权转让审核接口失败!");
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}
		logger.info(result);
		serializeToJson(request, response, result);
		return null;
	}
	
	
	
	
	/**
	 * 申请发放债权/ 申请发放债权审核
	 * @param 返回数据结果集
	 * @param response 相应请求给客户端
	 * @return 返回查询的数据
	 * @throws Exception
	 */
	@Autowired
	private ZqshcgService zqshcgService;
	@RequestMapping("SqffZq_app")
	public String SqffZq_app(HttpServletRequest request,HttpServletResponse response) throws Exception{
		logger.info("SqffZq_app 初始化申请发放债权接口!!!");
		String content =  RequestUtils.getStringParameter(request, "content");
		Des des = new Des();//获取加密解密类
		JSONObject result = new JSONObject();//获取json
		Map<String,String> map = new HashMap<String,String>();
		Map<String,Object> resmap = new HashMap<String,Object>();
		try
		{
			String decodeContent = des.decrypt(content);
			String uContent = new String(decodeContent.getBytes(),"UTF-8");
			decodeContent = URLDecoder.decode(uContent, "UTF-8");
			logger.info("SqffZq_app decodeContent is : " + decodeContent);
			String[] contents = decodeContent.split("&");
			if(contents != null && contents.length > 0){
				map = this.getContentMap(decodeContent);
				logger.info("map decodeContent is : " + map.toString());
				JSONObject params = new JSONObject();
				String pageNum= map.get("pageNum");
				String pageSize= map.get("pageSize");
				
				int start=0;
				int limit=0;
				if (StringUtils.isNotEmpty(pageNum)&& StringUtils.isNotEmpty(pageSize)) {
					start=(Integer.valueOf(pageNum)-1)*Integer.valueOf(pageSize);
					limit=Integer.valueOf(pageSize);
				}
				params.put("start", start);
				params.put("limit", limit);
				params.put("startDate",  map.get("startDate"));
				params.put("endDate",  map.get("endDate"));
				params.put("xmmct",map.get("xmmct"));
				params.put("jkrt",map.get("jkrt"));
				params.put("state",map.get("state"));
				params.put("dfridt",map.get("dfridt"));
				params.put("xmType",map.get("xmType"));
				List<Map<String, Object>> list = zqshcgService.queryZqshjgList(params);
				List<Map<String, Object>> list2=new ArrayList<>();
				int i=start+1;
				for (Map<String, Object> map2 : list) {
					map2.put("ORDER", i);
					list2.add(map2);
					i++;
				}
				int count =zqshcgService.getZqshjCount(params);
				resmap.put("data", list2);	
				resmap.put("total", count);
				resmap.put("res", "0");
				resmap.put("msg", "查询成功！");
			}else{
				resmap.put("res", "1");
				resmap.put("msg", "参数不正确!");
			}
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}catch(Exception ex){
			logger.error(ex.getMessage());
			resmap.put("res", "1");
			resmap.put("msg", "获取申请发放债权接口失败!");
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}
		logger.info(result);
		serializeToJson(request, response, result);
		return null;
	}
	/**
	 * 申请发放债权审核审核功能
	 * @param 返回数据结果集
	 * @param response 相应请求给客户端
	 * @return 返回查询的数据
	 * @throws Exception
	 */

	@RequestMapping("SqffZqsh_app")
	public String SqffZqsh_app(HttpServletRequest request,HttpServletResponse response) throws Exception{
		logger.info("SqffZqsh_app 初始化申请发放债权审核接口!!!");
		String content =  RequestUtils.getStringParameter(request, "content");
		Des des = new Des();//获取加密解密类
		JSONObject result = new JSONObject();//获取json
		Map<String,String> map = new HashMap<String,String>();
		Map<String,Object> resmap = new HashMap<String,Object>();
		try{
			String decodeContent = des.decrypt(content);
			String uContent = new String(decodeContent.getBytes(),"UTF-8");
			decodeContent = URLDecoder.decode(uContent, "UTF-8");
			logger.info("SqffZqsh_app decodeContent is : " + decodeContent);
			String[] contents = decodeContent.split("&");
			if(contents != null && contents.length > 0){
				map = this.getContentMap(decodeContent);
				logger.info("map decodeContent is : " + map.toString());
				JSONObject params = new JSONObject();
				params.put("id",  map.get("zq_cg_id"));
				params.put("shr",  map.get("userId"));
				params.put("shState",map.get("sh_state"));
				params.put("shContent",map.get("sh_content"));
		
				Map<String, Object> zqshcgMap = zqshcgService.getZqshcg(params);
				if(null == zqshcgMap){
					resmap.put("res", "1");
					resmap.put("msg", "信息有误！");
				}else if(zqshcgMap.containsKey("STATE")){
					Object stateObj = zqshcgMap.get("STATE");
					if(null != stateObj && stateObj.toString().equals("01")){//待审核状态才可以审核
							boolean isSHSuc = zqshcgService.saveSHZqshcg(params);
							if (isSHSuc) {
								resmap.put("res", "0");
								resmap.put("msg", "审核成功!");
							}else {
								resmap.put("res", "1");
								resmap.put("msg", "审核失败!");
							}
					}else{//无审核状态信息,无法审核
						resmap.put("res", "1");
						resmap.put("msg", "该申请已审核过，请勿重复操作！");
					}
				}
			}
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}catch(Exception ex){
			logger.error(ex.getMessage());
			resmap.put("res", "1");
			resmap.put("msg", "获取申请发放债权审核接口失败!");
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}
		logger.info(result);
		serializeToJson(request, response, result);
		return null;
	}

	/**
	 * 借款人还款管理
	 * @param 返回数据结果集
	 * @param response 相应请求给客户端
	 * @return 返回查询的数据
	 * @throws Exception
	 */
	@Autowired
	private JkglService jkglService;
	@RequestMapping("Jqrhk_app")
	public String Jqrhk_app(HttpServletRequest request,HttpServletResponse response) throws Exception{
		logger.info("Jqrhk_app 初始化借款人还款管理接口!!!");
		String content =  RequestUtils.getStringParameter(request, "content");
		Des des = new Des();//获取加密解密类
		JSONObject result = new JSONObject();//获取json
		Map<String,String> map = new HashMap<String,String>();
		Map<String,Object> resmap = new HashMap<String,Object>();
		try
		{
			String decodeContent = des.decrypt(content);
			String uContent = new String(decodeContent.getBytes(),"UTF-8");
			decodeContent = URLDecoder.decode(uContent, "UTF-8");
			logger.info("Jqrhk_app decodeContent is : " + decodeContent);
			String[] contents = decodeContent.split("&");
			if(contents != null && contents.length > 0){
				map = this.getContentMap(decodeContent);
				logger.info("map decodeContent is : " + map.toString());
				JSONObject params = new JSONObject();
				String pageNum= map.get("pageNum");
				String pageSize= map.get("pageSize");
				
				int start=0;
				int limit=0;
				if (StringUtils.isNotEmpty(pageNum)&& StringUtils.isNotEmpty(pageSize)) {
					start=(Integer.valueOf(pageNum)-1)*Integer.valueOf(pageSize);
					limit=Integer.valueOf(pageSize);
				}
				params.put("start", start);
				params.put("limit", limit);
				params.put("startDate",  map.get("startDate"));
				params.put("endDate",  map.get("endDate"));
				params.put("xmmct",map.get("xmmct"));
				params.put("jkrt",map.get("jkrt"));
				params.put("state",map.get("state"));
				params.put("dfrid",map.get("dfrid"));
				params.put("xmType",map.get("xmType"));
				List<Map<String, Object>> list = jkglService.queryJkglHkList(params);
				List<Map<String, Object>> list2=new ArrayList<>();
				int i=start+1;
				for (Map<String, Object> map2 : list) {
					map2.put("ORDER", i);
					list2.add(map2);
					i++;
				}
				int count =jkglService.getJkglHkCount(params);
				resmap.put("data", list2);	
				resmap.put("total", count);
				resmap.put("res", "0");
				resmap.put("msg", "查询成功！");
			}else{
				resmap.put("res", "1");
				resmap.put("msg", "参数不正确!");
			}
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}catch(Exception ex){
			logger.error(ex.getMessage());
			resmap.put("res", "1");
			resmap.put("msg", "获取借款人还款管理接口失败!");
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}
		logger.info(result);
		serializeToJson(request, response, result);
		return null;
	}
	
	
	/**
	 * 借款人还款明细
	 * @param 返回数据结果集
	 * @param response 相应请求给客户端
	 * @return 返回查询的数据
	 * @throws Exception
	 */

	@RequestMapping("Jqrhkmx_app")
	public String Jqrhkmx_app(HttpServletRequest request,HttpServletResponse response) throws Exception{
		logger.info("Jqrhkmx_app 初始化借款人还款明细接口!!!");
		String content =  RequestUtils.getStringParameter(request, "content");
		Des des = new Des();//获取加密解密类
		JSONObject result = new JSONObject();//获取json
		Map<String,String> map = new HashMap<String,String>();
		Map<String,Object> resmap = new HashMap<String,Object>();
		try
		{
			String decodeContent = des.decrypt(content);
			String uContent = new String(decodeContent.getBytes(),"UTF-8");
			decodeContent = URLDecoder.decode(uContent, "UTF-8");
			logger.info("Jqrhkmx_app decodeContent is : " + decodeContent);
			String[] contents = decodeContent.split("&");
			if(contents != null && contents.length > 0){
				map = this.getContentMap(decodeContent);
				logger.info("map decodeContent is : " + map.toString());
				JSONObject params = new JSONObject();
				String pageNum= map.get("pageNum");
				String pageSize= map.get("pageSize");
				
				int start=0;
				int limit=0;
				if (StringUtils.isNotEmpty(pageNum)&& StringUtils.isNotEmpty(pageSize)) {
					start=(Integer.valueOf(pageNum)-1)*Integer.valueOf(pageSize);
					limit=Integer.valueOf(pageSize);
				}
				params.put("start", start);
				params.put("limit", limit);
				params.put("startDate",  map.get("startDate"));
				params.put("endDate",  map.get("endDate"));
				params.put("xmmct",map.get("xmmct"));
				params.put("zqid",map.get("zqid"));
				params.put("state",map.get("state"));
				params.put("hkzl",map.get("hkzl"));
				List<Map<String, Object>> list = jkglService.queryHkmxList(params);
				List<Map<String, Object>> list2=new ArrayList<>();
				int i=start+1;
				for (Map<String, Object> map2 : list) {
					map2.put("ORDER", i);
					list2.add(map2);
					i++;
				}
				int count =jkglService.getHkmxCount(params);
				resmap.put("data", list2);	
				resmap.put("total", count);
				resmap.put("res", "0");
				resmap.put("msg", "查询成功！");
			}else{
				resmap.put("res", "1");
				resmap.put("msg", "参数不正确!");
			}
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}catch(Exception ex){
			logger.error(ex.getMessage());
			resmap.put("res", "1");
			resmap.put("msg", "获取借款人还款明细接口失败!");
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}
		logger.info(result);
		serializeToJson(request, response, result);
		return null;
	}
	
	
	/**
	 * Tjr管理/推荐人信息查询
	 * @param 返回数据结果集
	 * @param response 相应请求给客户端
	 * @return 返回查询的数据
	 * @throws Exception
	 */
	
	@RequestMapping("Tjr_app")
	public String Tjr_app(HttpServletRequest request,HttpServletResponse response) throws Exception{
		logger.info("Tjr_app 初始化Tjr管理接口!!!");
		String content =  RequestUtils.getStringParameter(request, "content");
		Des des = new Des();//获取加密解密类
		JSONObject result = new JSONObject();//获取json
		Map<String,String> map = new HashMap<String,String>();
		Map<String,Object> resmap = new HashMap<String,Object>();
		try
		{
			String decodeContent = des.decrypt(content);
			String uContent = new String(decodeContent.getBytes(),"UTF-8");
			decodeContent = URLDecoder.decode(uContent, "UTF-8");
			logger.info("Tjr_app decodeContent is : " + decodeContent);
			String[] contents = decodeContent.split("&");
			if(contents != null && contents.length > 0){
				map = this.getContentMap(decodeContent);
				logger.info("map decodeContent is : " + map.toString());
				JSONObject params = new JSONObject();
				String pageNum= map.get("pageNum");
				String pageSize= map.get("pageSize");
				
				int start=0;
				int limit=0;
				if (StringUtils.isNotEmpty(pageNum)&& StringUtils.isNotEmpty(pageSize)) {
					start=(Integer.valueOf(pageNum)-1)*Integer.valueOf(pageSize);
					limit=Integer.valueOf(pageSize);
				}
				params.put("start", start);
				params.put("limit", limit);
				params.put("startDate",  map.get("startDate"));
				params.put("endDate",  map.get("endDate"));
				params.put("user_name",map.get("user_name"));
				params.put("sjhm",map.get("sjhm"));
				params.put("realName",map.get("realName"));
				params.put("tjr",map.get("tjr"));
				params.put("sfzNum",map.get("sfzNum"));
				List<Map<String, Object>> list = tjrService.querytjr(params);
				List<Map<String, Object>> list2=new ArrayList<>();
				int i=start+1;
				for (Map<String, Object> map2 : list) {
					map2.put("ORDER", i);
					list2.add(map2);
					i++;
				}
				int count =tjrService.gettjrCount(params);
				resmap.put("data", list2);	
				resmap.put("total", count);
				resmap.put("res", "0");
				resmap.put("msg", "查询成功！");
			}else{
				resmap.put("res", "1");
				resmap.put("msg", "参数不正确!");
			}
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}catch(Exception ex){
			logger.error(ex.getMessage());
			resmap.put("res", "1");
			resmap.put("msg", "获取Tjr管理接口失败!");
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}
		logger.info(result);
		serializeToJson(request, response, result);
		return null;
	}
	
	/**
	 * 推荐人历史明细
	 * @param 返回数据结果集
	 * @param response 相应请求给客户端
	 * @return 返回查询的数据
	 * @throws Exception
	 */
	
	@RequestMapping("Xgjr_app")
	public String Xgjr_app(HttpServletRequest request,HttpServletResponse response) throws Exception{
		logger.info("Xgjr_app 初始推荐人历史明细接口!!!");
		String content =  RequestUtils.getStringParameter(request, "content");
		Des des = new Des();//获取加密解密类
		JSONObject result = new JSONObject();//获取json
		Map<String,String> map = new HashMap<String,String>();
		Map<String,Object> resmap = new HashMap<String,Object>();
		try
		{
			String decodeContent = des.decrypt(content);
			String uContent = new String(decodeContent.getBytes(),"UTF-8");
			decodeContent = URLDecoder.decode(uContent, "UTF-8");
			logger.info("Xgjr_app decodeContent is : " + decodeContent);
			String[] contents = decodeContent.split("&");
			if(contents != null && contents.length > 0){
				map = this.getContentMap(decodeContent);
				logger.info("map decodeContent is : " + map.toString());
				JSONObject params = new JSONObject();
				String pageNum= map.get("pageNum");
				String pageSize= map.get("pageSize");
				
				int start=0;
				int limit=0;
				if (StringUtils.isNotEmpty(pageNum)&& StringUtils.isNotEmpty(pageSize)) {
					start=(Integer.valueOf(pageNum)-1)*Integer.valueOf(pageSize);
					limit=Integer.valueOf(pageSize);
				}
				params.put("start", start);
				params.put("limit", limit);
				params.put("startDate",  map.get("startDate"));
				params.put("endDate",  map.get("endDate"));
				params.put("name",map.get("name"));
				params.put("sjhm",map.get("sjhm"));
				params.put("ytjr",map.get("ytjr"));
				params.put("xtjr",map.get("xtjr"));
				params.put("xgr",map.get("xgr"));
				List<Map<String, Object>> list = tjrService.queryxTjr(params);
				List<Map<String, Object>> list2=new ArrayList<>();
				int i=start+1;
				for (Map<String, Object> map2 : list) {
					map2.put("ORDER", i);
					list2.add(map2);
					i++;
				}
				int count =tjrService.queryxTjrcount(params);
				resmap.put("data", list2);	
				resmap.put("total", count);
				resmap.put("res", "0");
				resmap.put("msg", "查询成功！");
			}else{
				resmap.put("res", "1");
				resmap.put("msg", "参数不正确!");
			}
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}catch(Exception ex){
			logger.error(ex.getMessage());
			resmap.put("res", "1");
			resmap.put("msg", "获取推荐人历史明细接口失败!");
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}
		logger.info(result);
		serializeToJson(request, response, result);
		return null;
	}
	
	/**
	 * 客户反馈
	 * @param 返回数据结果集
	 * @param response 相应请求给客户端
	 * @return 返回查询的数据
	 * @throws Exception
	 */
	@Resource
	private P2PCustomerService p2pCustomerService;
	@RequestMapping(" consumer_app")
	public String consumer_app(HttpServletRequest request,HttpServletResponse response) throws Exception{
		logger.info("consumer_app 初始化客户反馈接口!!!");
		String content =  RequestUtils.getStringParameter(request, "content");
		Des des = new Des();//获取加密解密类
		JSONObject result = new JSONObject();//获取json
		Map<String,String> map = new HashMap<String,String>();
		Map<String,Object> resmap = new HashMap<String,Object>();
		try
		{
			String decodeContent = des.decrypt(content);
			String uContent = new String(decodeContent.getBytes(),"UTF-8");
			decodeContent = URLDecoder.decode(uContent, "UTF-8");
			logger.info("consumer_app decodeContent is : " + decodeContent);
			String[] contents = decodeContent.split("&");
			if(contents != null && contents.length > 0){
				map = this.getContentMap(decodeContent);
				logger.info("map decodeContent is : " + map.toString());
				JSONObject params = new JSONObject();
				String pageNum= map.get("pageNum");
				String pageSize= map.get("pageSize");
				
				int start=0;
				int limit=0;
				if (StringUtils.isNotEmpty(pageNum)&& StringUtils.isNotEmpty(pageSize)) {
					start=(Integer.valueOf(pageNum)-1)*Integer.valueOf(pageSize);
					limit=Integer.valueOf(pageSize);
				}
				params.put("start", start);
				params.put("limit", limit);
				params.put("ADVICE_START_DATE",  map.get("ADVICE_START_DATE"));
				params.put("ADVICE_END_DATE",  map.get("ADVICE_END_DATE"));
				params.put("USER_ID",map.get("USER_ID"));
				params.put("LXFS",map.get("LXFS"));
				params.put("DEVICE_TYPE",map.get("DEVICE_TYPE"));
				List<Map<String, Object>> list = p2pCustomerService.getCustomerFeedBackInfo(params);
				List<Map<String, Object>> list2=new ArrayList<>();
				int i=start+1;
				for (Map<String, Object> map2 : list) {
					map2.put("ORDER", i);
					list2.add(map2);
					i++;
				}
				int count = p2pCustomerService.getPageCount(params);
				resmap.put("data", list2);	
				resmap.put("total", count);
				resmap.put("res", "0");
				resmap.put("msg", "查询成功！");
			}else{
				resmap.put("res", "1");
				resmap.put("msg", "参数不正确!");
			}
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}catch(Exception ex){
			logger.error(ex.getMessage());
			resmap.put("res", "1");
			resmap.put("msg", "获取客户反馈接口失败!");
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}
		logger.info(result);
		serializeToJson(request, response, result);
		return null;
	}
	
	
	/**
	 * Vip充值
	 * @param 返回数据结果集
	 * @param response 相应请求给客户端
	 * @return 返回查询的数据
	 * @throws Exception
	 */

	@Autowired
	private VipService vipService;
	@RequestMapping("Vipcz_app")
	public String Vipcz_app(HttpServletRequest request,HttpServletResponse response) throws Exception{
		logger.info("Vipcz_app 初始化客户反馈接口!!!");
		String content =  RequestUtils.getStringParameter(request, "content");
		Des des = new Des();//获取加密解密类
		JSONObject result = new JSONObject();//获取json
		Map<String,String> map = new HashMap<String,String>();
		Map<String,Object> resmap = new HashMap<String,Object>();
		try
		{
			String decodeContent = des.decrypt(content);
			String uContent = new String(decodeContent.getBytes(),"UTF-8");
			decodeContent = URLDecoder.decode(uContent, "UTF-8");
			logger.info("Vipcz_app decodeContent is : " + decodeContent);
			String[] contents = decodeContent.split("&");
			if(contents != null && contents.length > 0){
				map = this.getContentMap(decodeContent);
				logger.info("map decodeContent is : " + map.toString());
				JSONObject params = new JSONObject();
				String pageNum= map.get("pageNum");
				String pageSize= map.get("pageSize");
				
				int start=0;
				int limit=0;
				if (StringUtils.isNotEmpty(pageNum)&& StringUtils.isNotEmpty(pageSize)) {
					start=(Integer.valueOf(pageNum)-1)*Integer.valueOf(pageSize);
					limit=Integer.valueOf(pageSize);
				}
				params.put("start", start);
				params.put("limit", limit);
				params.put("startDate",  map.get("startDate"));
				params.put("endDate",  map.get("endDate"));
				params.put("username",map.get("username"));
				params.put("tjr",map.get("tjr"));
				params.put("sjhm",map.get("sjhm"));
				List<Map<String, Object>> list =vipService.vipczQuery(params);
				List<Map<String, Object>> list2=new ArrayList<>();
				int i=start+1;
				for (Map<String, Object> map2 : list) {
					map2.put("ORDER", i);
					list2.add(map2);
					i++;
				}
				int count =vipService.getPageCount(params);
				resmap.put("data", list2);	
				resmap.put("total", count);
				resmap.put("res", "0");
				resmap.put("msg", "查询成功！");
			}else{
				resmap.put("res", "1");
				resmap.put("msg", "参数不正确!");
			}
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}catch(Exception ex){
			logger.error(ex.getMessage());
			resmap.put("res", "1");
			resmap.put("msg", "获取Vip充值接口失败!");
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}
		logger.info(result);
		serializeToJson(request, response, result);
		return null;
	}
	
	/**
	 * 红包明细查询,时间必须传
	 * @param 返回数据结果集
	 * @param response 相应请求给客户端
	 * @return 返回查询的数据
	 * @throws Exception
	 */
	@Autowired
	private P2PHBService p2phbService;
	@RequestMapping("Hbmxcx_app")
	public String Hbmxcx_app(HttpServletRequest request,HttpServletResponse response) throws Exception{
		logger.info("Hbmxcx_app 初始化红包明细查询接口!!!");
		String content =  RequestUtils.getStringParameter(request, "content");
		Des des = new Des();//获取加密解密类
		JSONObject result = new JSONObject();//获取json
		Map<String,String> map = new HashMap<String,String>();
		Map<String,Object> resmap = new HashMap<String,Object>();
		try
		{
			String decodeContent = des.decrypt(content);
			String uContent = new String(decodeContent.getBytes(),"UTF-8");
			decodeContent = URLDecoder.decode(uContent, "UTF-8");
			logger.info("Hbmxcx_app decodeContent is : " + decodeContent);
			String[] contents = decodeContent.split("&");
			if(contents != null && contents.length > 0){
				map = this.getContentMap(decodeContent);
				logger.info("map decodeContent is : " + map.toString());
				JSONObject params = new JSONObject();
				String pageNum= map.get("pageNum");
				String pageSize= map.get("pageSize");
				
				int start=0;
				int limit=0;
				if (StringUtils.isNotEmpty(pageNum)&& StringUtils.isNotEmpty(pageSize)) {
					start=(Integer.valueOf(pageNum)-1)*Integer.valueOf(pageSize);
					limit=Integer.valueOf(pageSize);
				}
				params.put("start", start);
				params.put("limit", limit);
				params.put("HB_USE_DATE_START",  map.get("HB_USE_DATE_START"));
				params.put("HB_USE_DATE_END",  map.get("HB_USE_DATE_END"));
				params.put("HB_USE_CONDITION_MIN_JE",map.get("HB_USE_CONDITION_MIN_JE"));
				params.put("HB_STATE",map.get("HB_STATE"));
				params.put("USER_ID",map.get("USER_ID"));
				params.put("HB_EFFECTIVE_DAYS",map.get("HB_EFFECTIVE_DAYS"));
				params.put("HB_JE",map.get("HB_JE"));
				params.put("HB_CREATE_DATE_START",map.get("HB_CREATE_DATE_START"));
				params.put("HB_CREATE_DATE_END",map.get("HB_CREATE_DATE_END"));
				params.put("USER_ID_LXFS",map.get("USER_ID_LXFS"));
				List<Map<String, Object>> list =p2phbService.hbDetailsQuery(params);
				List<Map<String, Object>> list2=new ArrayList<>();
				int i=start+1;
				for (Map<String, Object> map2 : list) {
					map2.put("ORDER", i);
					list2.add(map2);
					i++;
				}
				int count =p2phbService.getPageCount(params);
				resmap.put("data", list2);	
				resmap.put("total", count);
				resmap.put("res", "0");
				resmap.put("msg", "查询成功！");
			}else{
				resmap.put("res", "1");
				resmap.put("msg", "参数不正确!");
			}
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}catch(Exception ex){
			logger.error(ex.getMessage());
			resmap.put("res", "1");
			resmap.put("msg", "获取红包明细查询接口失败!");
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}
		logger.info(result);
		serializeToJson(request, response, result);
		return null;
	}

	/**
	 * 银行卡信息查询
	 * @param 返回数据结果集
	 * @param response 相应请求给客户端
	 * @return 返回查询的数据
	 * @throws Exception
	 */

	@Autowired
	private BankcardService bankcardService;
	@RequestMapping("Bankcard_app")
	public String Bankcard_app(HttpServletRequest request,HttpServletResponse response) throws Exception{
		logger.info("Bankcard_app 初始化银行卡信息查询接口!!!");
		String content =  RequestUtils.getStringParameter(request, "content");
		Des des = new Des();//获取加密解密类
		JSONObject result = new JSONObject();//获取json
		Map<String,String> map = new HashMap<String,String>();
		Map<String,Object> resmap = new HashMap<String,Object>();
		try
		{
			String decodeContent = des.decrypt(content);
			String uContent = new String(decodeContent.getBytes(),"UTF-8");
			decodeContent = URLDecoder.decode(uContent, "UTF-8");
			logger.info("Bankcard_app decodeContent is : " + decodeContent);
			String[] contents = decodeContent.split("&");
			if(contents != null && contents.length > 0){
				map = this.getContentMap(decodeContent);
				logger.info("map decodeContent is : " + map.toString());
				JSONObject params = new JSONObject();
				String pageNum= map.get("pageNum");
				String pageSize= map.get("pageSize");
				
				int start=0;
				int limit=0;
				if (StringUtils.isNotEmpty(pageNum)&& StringUtils.isNotEmpty(pageSize)) {
					start=(Integer.valueOf(pageNum)-1)*Integer.valueOf(pageSize);
					limit=Integer.valueOf(pageSize);
				}
				params.put("start", start);
				params.put("limit", limit);
				params.put("startDate",  map.get("startDate"));
				params.put("endDate",  map.get("endDate"));
				params.put("userid",map.get("userid"));
				params.put("sjhm",map.get("sjhm"));
				params.put("cardid",map.get("cardid"));
				params.put("sfzhm",map.get("sfzhm"));
				List<Map<String, Object>> list =bankcardService.querybakcard(params);
				List<Map<String, Object>> list2=new ArrayList<>();
				int i=start+1;
				for (Map<String, Object> map2 : list) {
					map2.put("ORDER", i);
					list2.add(map2);
					i++;
				}
				int count =bankcardService.getbankcardCount(params);
				resmap.put("data", list2);	
				resmap.put("total", count);
				resmap.put("res", "0");
				resmap.put("msg", "查询成功！");
			}else{
				resmap.put("res", "1");
				resmap.put("msg", "参数不正确!");
			}
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}catch(Exception ex){
			logger.error(ex.getMessage());
			resmap.put("res", "1");
			resmap.put("msg", "获取银行卡信息查询接口失败!");
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}
		logger.info(result);
		serializeToJson(request, response, result);
		return null;
	}
	
	
	/**
	 * 提现查询
	 * @param 返回数据结果集
	 * @param response 相应请求给客户端
	 * @return 返回查询的数据
	 * @throws Exception
	 */

	@Autowired
	private TxService txService;
	@RequestMapping("Txxx_app")
	public String Txxx_app(HttpServletRequest request,HttpServletResponse response) throws Exception{
		logger.info("Txxx_app 初始化提现查询接口!!!");
		String content =  RequestUtils.getStringParameter(request, "content");
		Des des = new Des();//获取加密解密类
		JSONObject result = new JSONObject();//获取json
		Map<String,String> map = new HashMap<String,String>();
		Map<String,Object> resmap = new HashMap<String,Object>();
		try
		{
			String decodeContent = des.decrypt(content);
			String uContent = new String(decodeContent.getBytes(),"UTF-8");
			decodeContent = URLDecoder.decode(uContent, "UTF-8");
			logger.info("Txxx_app decodeContent is : " + decodeContent);
			String[] contents = decodeContent.split("&");
			if(contents != null && contents.length > 0){
				map = this.getContentMap(decodeContent);
				logger.info("map decodeContent is : " + map.toString());
				JSONObject params = new JSONObject();
				String pageNum= map.get("pageNum");
				String pageSize= map.get("pageSize");
				
				int start=0;
				int limit=0;
				if (StringUtils.isNotEmpty(pageNum)&& StringUtils.isNotEmpty(pageSize)) {
					start=(Integer.valueOf(pageNum)-1)*Integer.valueOf(pageSize);
					limit=Integer.valueOf(pageSize);
				}
				params.put("start", start);
				params.put("limit", limit);
				params.put("startDate",  map.get("startDate"));
				params.put("endDate",  map.get("endDate"));
				params.put("gyh",map.get("gyh"));
				params.put("sjhm",map.get("sjhm"));
				params.put("txState",map.get("txState"));
				List<Map<String, Object>> list =txService.queryTxList(params);
				List<Map<String, Object>> list2=new ArrayList<>();
				int i=start+1;
				for (Map<String, Object> map2 : list) {
					map2.put("ORDER", i);
					list2.add(map2);
					i++;
				}
				int count =txService.getTxCount(params);
				String sumJe=txService.getTxSum(params);
				resmap.put("sumJe", sumJe);	
				resmap.put("data", list2);	
				resmap.put("total", count);
				resmap.put("res", "0");
				resmap.put("msg", "查询成功！");
			}else{
				resmap.put("res", "1");
				resmap.put("msg", "参数不正确!");
			}
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}catch(Exception ex){
			logger.error(ex.getMessage());
			resmap.put("res", "1");
			resmap.put("msg", "获取提现查询接口失败!");
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}
		logger.info(result);
		serializeToJson(request, response, result);
		return null;
	}
	
	
	/**
	 * 充值查询
	 * @param 返回数据结果集
	 * @param response 相应请求给客户端
	 * @return 返回查询的数据
	 * @throws Exception
	 */

	@Autowired
	private CzService CzService;
	@RequestMapping("Czxx_app")
	public String Czxx_app(HttpServletRequest request,HttpServletResponse response) throws Exception{
		logger.info("Czxx_app 初始化充值查询接口!!!");
		String content =  RequestUtils.getStringParameter(request, "content");
		Des des = new Des();//获取加密解密类
		JSONObject result = new JSONObject();//获取json
		Map<String,String> map = new HashMap<String,String>();
		Map<String,Object> resmap = new HashMap<String,Object>();
		try
		{
			String decodeContent = des.decrypt(content);
			String uContent = new String(decodeContent.getBytes(),"UTF-8");
			decodeContent = URLDecoder.decode(uContent, "UTF-8");
			logger.info("Czxx_app decodeContent is : " + decodeContent);
			String[] contents = decodeContent.split("&");
			if(contents != null && contents.length > 0){
				map = this.getContentMap(decodeContent);
				logger.info("map decodeContent is : " + map.toString());
				JSONObject params = new JSONObject();
				String pageNum= map.get("pageNum");
				String pageSize= map.get("pageSize");
				
				int start=0;
				int limit=0;
				if (StringUtils.isNotEmpty(pageNum)&& StringUtils.isNotEmpty(pageSize)) {
					start=(Integer.valueOf(pageNum)-1)*Integer.valueOf(pageSize);
					limit=Integer.valueOf(pageSize);
				}
				params.put("start", start);
				params.put("limit", limit);
				params.put("startDate",  map.get("startDate"));
				params.put("endDate",  map.get("endDate"));
				params.put("minczje",map.get("minczje"));
				params.put("maxczje",map.get("maxczje"));
				params.put("sjhm",map.get("sjhm"));
				params.put("gyh",map.get("gyh"));
				params.put("tjr",map.get("tjr"));
				params.put("ddh",map.get("ddh"));
				params.put("czState",map.get("czState"));
				List<Map<String, Object>> list =CzService.queryCzList(params);
				List<Map<String, Object>> list2=new ArrayList<>();
				int i=start+1;
				for (Map<String, Object> map2 : list) {
					map2.put("ORDER", i);
					list2.add(map2);
					i++;
				}
				int count =CzService.getCzCount(params);
				String czjeSum=CzService.geCzjeSum(params);
				resmap.put("czjeSum", czjeSum);	
				resmap.put("data", list2);	
				resmap.put("total", count);
				resmap.put("res", "0");
				resmap.put("msg", "查询成功！");
			}else{
				resmap.put("res", "1");
				resmap.put("msg", "参数不正确!");
			}
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}catch(Exception ex){
			logger.error(ex.getMessage());
			resmap.put("res", "1");
			resmap.put("msg", "获取充值查询接口失败!");
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}
		logger.info(result);
		serializeToJson(request, response, result);
		return null;
	}
	
	
	/**
	 * vip抽奖结果
	 * @param 返回数据结果集
	 * @param response 相应请求给客户端
	 * @return 返回查询的数据
	 * @throws Exception
	 */
	@Autowired
	private CjjgService cjjgService;
	@RequestMapping("Cjjg_app")
	public String Cjjg_app(HttpServletRequest request,HttpServletResponse response) throws Exception{
		logger.info("Cjjg_app 初始化vip抽奖结果接口!!!");
		String content =  RequestUtils.getStringParameter(request, "content");
		Des des = new Des();//获取加密解密类
		JSONObject result = new JSONObject();//获取json
		Map<String,String> map = new HashMap<String,String>();
		Map<String,Object> resmap = new HashMap<String,Object>();
		try
		{
			String decodeContent = des.decrypt(content);
			String uContent = new String(decodeContent.getBytes(),"UTF-8");
			decodeContent = URLDecoder.decode(uContent, "UTF-8");
			logger.info("Cjjg_app decodeContent is : " + decodeContent);
			String[] contents = decodeContent.split("&");
			if(contents != null && contents.length > 0){
				map = this.getContentMap(decodeContent);
				logger.info("map decodeContent is : " + map.toString());
				JSONObject params = new JSONObject();
				String pageNum= map.get("pageNum");
				String pageSize= map.get("pageSize");
				
				int start=0;
				int limit=0;
				if (StringUtils.isNotEmpty(pageNum)&& StringUtils.isNotEmpty(pageSize)) {
					start=(Integer.valueOf(pageNum)-1)*Integer.valueOf(pageSize);
					limit=Integer.valueOf(pageSize);
				}
				params.put("start", start);
				params.put("limit", limit);
				params.put("startDate",  map.get("startDate"));
				params.put("endDate",  map.get("endDate"));
				params.put("username",map.get("username"));
				params.put("sjhm",map.get("sjhm"));
				params.put("vip_dj",map.get("vip_dj"));
				params.put("jxx",map.get("jxx"));
				List<Map<String, Object>> list =cjjgService.queryCjjgList(params);
				List<Map<String, Object>> list2=new ArrayList<>();
				int i=start+1;
				for (Map<String, Object> map2 : list) {
					map2.put("ORDER", i);
					list2.add(map2);
					i++;
				}
				int count =cjjgService.getCjjgCount(params);
				resmap.put("data", list2);	
				resmap.put("total", count);
				resmap.put("res", "0");
				resmap.put("msg", "查询成功！");
			}else{
				resmap.put("res", "1");
				resmap.put("msg", "参数不正确!");
			}
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}catch(Exception ex){
			logger.error(ex.getMessage());
			resmap.put("res", "1");
			resmap.put("msg", "获取vip抽奖结果接口失败!");
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}
		logger.info(result);
		serializeToJson(request, response, result);
		return null;
	}
	
	/**
	 * 推广vip发放收益
	 * @param 返回数据结果集
	 * @param response 相应请求给客户端
	 * @return 返回查询的数据
	 * @throws Exception
	 */
	@Autowired
	private TgsyService tgsyService;
	@RequestMapping("Tgvipffsy_app")
	public String Tgvipffsy_app(HttpServletRequest request,HttpServletResponse response) throws Exception{
		logger.info("Tgvipffsy_app 初始化推广vip发放收益接口!!!");
		String content =  RequestUtils.getStringParameter(request, "content");
		Des des = new Des();//获取加密解密类
		JSONObject result = new JSONObject();//获取json
		Map<String,String> map = new HashMap<String,String>();
		Map<String,Object> resmap = new HashMap<String,Object>();
		try
		{
			String decodeContent = des.decrypt(content);
			String uContent = new String(decodeContent.getBytes(),"UTF-8");
			decodeContent = URLDecoder.decode(uContent, "UTF-8");
			logger.info("Tgvipffsy_app decodeContent is : " + decodeContent);
			String[] contents = decodeContent.split("&");
			if(contents != null && contents.length > 0){
				map = this.getContentMap(decodeContent);
				logger.info("map decodeContent is : " + map.toString());
				JSONObject params = new JSONObject();
				String pageNum= map.get("pageNum");
				String pageSize= map.get("pageSize");
				
				int start=0;
				int limit=0;
				if (StringUtils.isNotEmpty(pageNum)&& StringUtils.isNotEmpty(pageSize)) {
					start=(Integer.valueOf(pageNum)-1)*Integer.valueOf(pageSize);
					limit=Integer.valueOf(pageSize);
				}
				params.put("start", start);
				params.put("limit", limit);
				params.put("startDate",  map.get("startDate"));
				params.put("endDate",  map.get("endDate"));
				params.put("state",map.get("state"));
				params.put("vipusername",map.get("vipusername"));
				params.put("sysrusername",map.get("syrusername"));
				params.put("vipsjhm",map.get("vipsjhm"));
				params.put("syrsjhm",map.get("syrsjhm"));
				List<Map<String, Object>> list =tgsyService.queryTgsyList(params);
				List<Map<String, Object>> list2=new ArrayList<>();
				int i=start+1;
				for (Map<String, Object> map2 : list) {
					map2.put("ORDER", i);
					list2.add(map2);
					i++;
				}
				int count =tgsyService.getTgsyCount(params);
				resmap.put("data", list2);	
				resmap.put("total", count);
				resmap.put("res", "0");
				resmap.put("msg", "查询成功！");
			}else{
				resmap.put("res", "1");
				resmap.put("msg", "参数不正确!");
			}
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}catch(Exception ex){
			logger.error(ex.getMessage());
			resmap.put("res", "1");
			resmap.put("msg", "获取推广vip发放收益接口失败!");
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}
		logger.info(result);
		serializeToJson(request, response, result);
		return null;
	}
	
	/**
	 * 推广债权发放收益
	 * @param 返回数据结果集
	 * @param response 相应请求给客户端
	 * @return 返回查询的数据
	 * @throws Exception
	 */
	@Autowired
	private ZqsyService zqsyService;
	@RequestMapping("Tgzqffsy_app")
	public String Tgzqffsy_app(HttpServletRequest request,HttpServletResponse response) throws Exception{
		logger.info("Tgzqffsy_app 初始化推推广债权发放收益接口!!!");
		String content =  RequestUtils.getStringParameter(request, "content");
		Des des = new Des();//获取加密解密类
		JSONObject result = new JSONObject();//获取json
		Map<String,String> map = new HashMap<String,String>();
		Map<String,Object> resmap = new HashMap<String,Object>();
		try
		{
			String decodeContent = des.decrypt(content);
			String uContent = new String(decodeContent.getBytes(),"UTF-8");
			decodeContent = URLDecoder.decode(uContent, "UTF-8");
			logger.info("Tgzqffsy_app decodeContent is : " + decodeContent);
			String[] contents = decodeContent.split("&");
			if(contents != null && contents.length > 0){
				map = this.getContentMap(decodeContent);
				logger.info("map decodeContent is : " + map.toString());
				JSONObject params = new JSONObject();
				String pageNum= map.get("pageNum");
				String pageSize= map.get("pageSize");
				
				int start=0;
				int limit=0;
				if (StringUtils.isNotEmpty(pageNum)&& StringUtils.isNotEmpty(pageSize)) {
					start=(Integer.valueOf(pageNum)-1)*Integer.valueOf(pageSize);
					limit=Integer.valueOf(pageSize);
				}
				params.put("start", start);
				params.put("limit", limit);
				params.put("startDate",  map.get("startDate"));
				params.put("endDate",  map.get("endDate"));
				params.put("tzryhm",map.get("tzryhm"));
				params.put("tzrsjhm",map.get("tzrsjhm"));
				params.put("syryhm",map.get("syryhm"));
				params.put("syrsjhm",map.get("syrsjhm"));
				params.put("state",map.get("state"));
				List<Map<String, Object>> list =zqsyService.queryZqsyList(params);
				List<Map<String, Object>> list2=new ArrayList<>();
				int i=start+1;
				for (Map<String, Object> map2 : list) {
					map2.put("ORDER", i);
					list2.add(map2);
					i++;
				}
				int count =zqsyService.getZqsyCount(params);
				resmap.put("data", list2);	
				resmap.put("total", count);
				resmap.put("res", "0");
				resmap.put("msg", "查询成功！");
			}else{
				resmap.put("res", "1");
				resmap.put("msg", "参数不正确!");
			}
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}catch(Exception ex){
			logger.error(ex.getMessage());
			resmap.put("res", "1");
			resmap.put("msg", "获取推广债权发放收益接口失败!");
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}
		logger.info(result);
		serializeToJson(request, response, result);
		return null;
	}
	
	
	
	/**
	 * 财务转账打款信息
	 * @param 返回数据结果集
	 * @param response 相应请求给客户端
	 * @return 返回查询的数据
	 * @throws Exception
	 */
	@Autowired
	private DkService dkService;
	@RequestMapping("Dk_app")
	public String Dk_app(HttpServletRequest request,HttpServletResponse response) throws Exception{
		logger.info("Dk_app 初始化财务转账打款信息接口!!!");
		String content =  RequestUtils.getStringParameter(request, "content");
		Des des = new Des();//获取加密解密类
		JSONObject result = new JSONObject();//获取json
		Map<String,String> map = new HashMap<String,String>();
		Map<String,Object> resmap = new HashMap<String,Object>();
		try
		{
			String decodeContent = des.decrypt(content);
			String uContent = new String(decodeContent.getBytes(),"UTF-8");
			decodeContent = URLDecoder.decode(uContent, "UTF-8");
			logger.info("Dk_app decodeContent is : " + decodeContent);
			String[] contents = decodeContent.split("&");
			if(contents != null && contents.length > 0){
				map = this.getContentMap(decodeContent);
				logger.info("map decodeContent is : " + map.toString());
				JSONObject params = new JSONObject();
				String pageNum= map.get("pageNum");
				String pageSize= map.get("pageSize");
				
				int start=0;
				int limit=0;
				if (StringUtils.isNotEmpty(pageNum)&& StringUtils.isNotEmpty(pageSize)) {
					start=(Integer.valueOf(pageNum)-1)*Integer.valueOf(pageSize);
					limit=Integer.valueOf(pageSize);
				}
				params.put("start", start);
				params.put("limit", limit);
				params.put("startDate",  map.get("startDate"));
				params.put("endDate",  map.get("endDate"));
				params.put("ddh",map.get("ddh"));
				params.put("mindkje",map.get("mindkje"));
				params.put("maxdkje",map.get("maxdkje"));
				params.put("state",map.get("state"));
				List<Map<String, Object>> list =dkService.querydk(params);
				List<Map<String, Object>> list2=new ArrayList<>();
				int i=start+1;
				for (Map<String, Object> map2 : list) {
					map2.put("ORDER", i);
					list2.add(map2);
					i++;
				}
				int count =dkService.getdkCount(params);
				resmap.put("data", list2);	
				resmap.put("total", count);
				resmap.put("res", "0");
				resmap.put("msg", "查询成功！");
			}else{
				resmap.put("res", "1");
				resmap.put("msg", "参数不正确!");
			}
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}catch(Exception ex){
			logger.error(ex.getMessage());
			resmap.put("res", "1");
			resmap.put("msg", "获取财务转账打款信息接口失败!");
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}
		logger.info(result);
		serializeToJson(request, response, result);
		return null;
	}
	
	
	

	/**
	 * 个人资产/用户资产变动明细
	 * @param 返回数据结果集
	 * @param response 相应请求给客户端
	 * @return 返回查询的数据
	 * @throws Exception
	 */
	@Autowired
	private GrsyService grsyService;
	@RequestMapping("Grzc_app")
	public String Grzc_app(HttpServletRequest request,HttpServletResponse response) throws Exception{
		logger.info("Grzc_app 初始化个人资产接口!!!");
		String content =  RequestUtils.getStringParameter(request, "content");
		Des des = new Des();//获取加密解密类
		JSONObject result = new JSONObject();//获取json
		Map<String,String> map = new HashMap<String,String>();
		Map<String,Object> resmap = new HashMap<String,Object>();
		try
		{
			String decodeContent = des.decrypt(content);
			String uContent = new String(decodeContent.getBytes(),"UTF-8");
			decodeContent = URLDecoder.decode(uContent, "UTF-8");
			logger.info("Grzc_app decodeContent is : " + decodeContent);
			String[] contents = decodeContent.split("&");
			if(contents != null && contents.length > 0){
				map = this.getContentMap(decodeContent);
				logger.info("map decodeContent is : " + map.toString());
				JSONObject params = new JSONObject();
				String pageNum= map.get("pageNum");
				String pageSize= map.get("pageSize");
				
				int start=0;
				int limit=0;
				if (StringUtils.isNotEmpty(pageNum)&& StringUtils.isNotEmpty(pageSize)) {
					start=(Integer.valueOf(pageNum)-1)*Integer.valueOf(pageSize);
					limit=Integer.valueOf(pageSize);
				}
				params.put("start", start);
				params.put("limit", limit);
				params.put("startDate",  map.get("startDate"));
				params.put("endDate",  map.get("endDate"));
				params.put("username",map.get("username"));
				params.put("minczje",map.get("minczje"));
				params.put("maxczje",map.get("maxczje"));
				params.put("sjhm",map.get("sjhm"));
				params.put("type",map.get("type"));
				List<Map<String, Object>> list =grsyService.queryGrsyList(params);
				List<Map<String, Object>> list2=new ArrayList<>();
				int i=start+1;
				for (Map<String, Object> map2 : list) {
					map2.put("ORDER", i);
					list2.add(map2);
					i++;
				}
				int count =grsyService.getGrsyCount(params);
				resmap.put("data", list2);	
				resmap.put("total", count);
				resmap.put("res", "0");
				resmap.put("msg", "查询成功！");
			}else{
				resmap.put("res", "1");
				resmap.put("msg", "参数不正确!");
			}
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}catch(Exception ex){
			logger.error(ex.getMessage());
			resmap.put("res", "1");
			resmap.put("msg", "获取个人资产接口失败!");
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}
		logger.info(result);
		serializeToJson(request, response, result);
		return null;
	}
	
	
	
	/**
	 * 借款人信息查询
	 * @param 返回数据结果集
	 * @param response 相应请求给客户端
	 * @return 返回查询的数据
	 * @throws Exception
	 */
	@Autowired
	private JkxxService jkxxService;
	@RequestMapping("Jkxx_app")
	public String Jkxx_app(HttpServletRequest request,HttpServletResponse response) throws Exception{
		logger.info("Jkxx_app 初始化借款人信息查询接口!!!");
		String content =  RequestUtils.getStringParameter(request, "content");
		Des des = new Des();//获取加密解密类
		JSONObject result = new JSONObject();//获取json
		Map<String,String> map = new HashMap<String,String>();
		Map<String,Object> resmap = new HashMap<String,Object>();
		try
		{
			String decodeContent = des.decrypt(content);
			String uContent = new String(decodeContent.getBytes(),"UTF-8");
			decodeContent = URLDecoder.decode(uContent, "UTF-8");
			logger.info("Jkxx_app decodeContent is : " + decodeContent);
			String[] contents = decodeContent.split("&");
			if(contents != null && contents.length > 0){
				map = this.getContentMap(decodeContent);
				logger.info("map decodeContent is : " + map.toString());
				JSONObject params = new JSONObject();
				String pageNum= map.get("pageNum");
				String pageSize= map.get("pageSize");
				
				int start=0;
				int limit=0;
				if (StringUtils.isNotEmpty(pageNum)&& StringUtils.isNotEmpty(pageSize)) {
					start=(Integer.valueOf(pageNum)-1)*Integer.valueOf(pageSize);
					limit=Integer.valueOf(pageSize);
				}
				params.put("start", start);
				params.put("limit", limit);
				params.put("startDate",  map.get("startDate"));
				params.put("endDate",  map.get("endDate"));
				params.put("jkqx",map.get("jkqx"));
				params.put("jkbt",map.get("jkbt"));
				params.put("username",map.get("username"));
				params.put("sjhm",map.get("sjhm"));
				params.put("type",map.get("type"));
				List<Map<String, Object>> list =jkxxService.queryJkxxList(params);
				List<Map<String, Object>> list2=new ArrayList<>();
				int i=start+1;
				for (Map<String, Object> map2 : list) {
					map2.put("ORDER", i);
					list2.add(map2);
					i++;
				}
				int count =jkxxService.getJkxxCount(params);
				resmap.put("data", list2);	
				resmap.put("total", count);
				resmap.put("res", "0");
				resmap.put("msg", "查询成功！");
			}else{
				resmap.put("res", "1");
				resmap.put("msg", "参数不正确!");
			}
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}catch(Exception ex){
			logger.error(ex.getMessage());
			resmap.put("res", "1");
			resmap.put("msg", "获取借款人信息查询接口失败!");
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}
		logger.info(result);
		serializeToJson(request, response, result);
		return null;
	}


	/**
	 * 单笔收益发放明细
	 * @param 返回数据结果集
	 * @param response 相应请求给客户端
	 * @return 返回查询的数据
	 * @throws Exception
	 */
	@Autowired
	private P2pDbhkService p2pDbhkService;
	@RequestMapping("dbsy_app")
	public String dbsy_app(HttpServletRequest request,HttpServletResponse response) throws Exception{
		logger.info("dbsy_app 初始化单笔收益发放明细接口!!!");
		String content =  RequestUtils.getStringParameter(request, "content");
		Des des = new Des();//获取加密解密类
		JSONObject result = new JSONObject();//获取json
		Map<String,String> map = new HashMap<String,String>();
		Map<String,Object> resmap = new HashMap<String,Object>();
		try
		{
			String decodeContent = des.decrypt(content);
			String uContent = new String(decodeContent.getBytes(),"UTF-8");
			decodeContent = URLDecoder.decode(uContent, "UTF-8");
			logger.info("dbsy_app decodeContent is : " + decodeContent);
			String[] contents = decodeContent.split("&");
			if(contents != null && contents.length > 0){
				map = this.getContentMap(decodeContent);
				logger.info("map decodeContent is : " + map.toString());
				JSONObject params = new JSONObject();
				String pageNum= map.get("pageNum");
				String pageSize= map.get("pageSize");
				
				int start=0;
				int limit=0;
				if (StringUtils.isNotEmpty(pageNum)&& StringUtils.isNotEmpty(pageSize)) {
					start=(Integer.valueOf(pageNum)-1)*Integer.valueOf(pageSize);
					limit=Integer.valueOf(pageSize);
				}
				params.put("start", start);
				params.put("limit", limit);
				params.put("startDate",  map.get("startDate"));
				params.put("endDate",  map.get("endDate"));
				params.put("sjhm",map.get("sjhm"));
				params.put("gyh",map.get("gyh"));
				params.put("tjr",map.get("tsjr"));
				List<Map<String, Object>> list =p2pDbhkService.queryDbsyffList(params);
				List<Map<String, Object>> list2=new ArrayList<>();
				int i=start+1;
				for (Map<String, Object> map2 : list) {
					map2.put("ORDER", i);
					list2.add(map2);
					i++;
				}
				int count =p2pDbhkService.getDbsyffCount(params);
				String sumJe=p2pDbhkService.getDbsyffSum(params);
				resmap.put("sumJe", sumJe);	
				resmap.put("data", list2);	
				resmap.put("total", count);
				resmap.put("res", "0");
				resmap.put("msg", "查询成功！");
			}else{
				resmap.put("res", "1");
				resmap.put("msg", "参数不正确!");
			}
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}catch(Exception ex){
			logger.error(ex.getMessage());
			resmap.put("res", "1");
			resmap.put("msg", "获取单笔收益发放明细接口失败!");
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}
		logger.info(result);
		serializeToJson(request, response, result);
		return null;
	}


	
	
	/**
	 * 债权转让列表
	 * @param 返回数据结果集
	 * @param response 相应请求给客户端
	 * @return 返回查询的数据
	 * @throws Exception
	 */
	@Autowired
	ZqzrlbService zqzrlbService;
	@RequestMapping("zqzrlb_app")
	public String zqzrlb_app(HttpServletRequest request,HttpServletResponse response) throws Exception{
		logger.info("zqzrlb_app 初始化债权转让列表接口!!!");
		String content =  RequestUtils.getStringParameter(request, "content");
		Des des = new Des();//获取加密解密类
		JSONObject result = new JSONObject();//获取json
		Map<String,String> map = new HashMap<String,String>();
		Map<String,Object> resmap = new HashMap<String,Object>();
		try
		{
			String decodeContent = des.decrypt(content);
			String uContent = new String(decodeContent.getBytes(),"UTF-8");
			decodeContent = URLDecoder.decode(uContent, "UTF-8");
			logger.info("zqzrlb_app decodeContent is : " + decodeContent);
			String[] contents = decodeContent.split("&");
			if(contents != null && contents.length > 0){
				map = this.getContentMap(decodeContent);
				logger.info("map decodeContent is : " + map.toString());
				JSONObject params = new JSONObject();
				String pageNum= map.get("pageNum");
				String pageSize= map.get("pageSize");
				
				int start=0;
				int limit=0;
				if (StringUtils.isNotEmpty(pageNum)&& StringUtils.isNotEmpty(pageSize)) {
					start=(Integer.valueOf(pageNum)-1)*Integer.valueOf(pageSize);
					limit=Integer.valueOf(pageSize);
				}
				params.put("start", start);
				params.put("limit", limit);
				params.put("startDate",  map.get("startDate"));
				params.put("endDate",  map.get("endDate"));
				params.put("xmmct",map.get("xmmct"));
				params.put("jkrt",map.get("jkrt"));
				params.put("dfridt",map.get("dfridt"));
				List<Map<String, Object>> list =zqzrlbService.queryZqzrlb(params);
				List<Map<String, Object>> list2=new ArrayList<>();
				int i=start+1;
				for (Map<String, Object> map2 : list) {
					map2.put("ORDER", i);
					list2.add(map2);
					i++;
				}
				int count =zqzrlbService.getZqzrlbCount(params);
				resmap.put("data", list2);	
				resmap.put("total", count);
				resmap.put("res", "0");
				resmap.put("msg", "查询成功！");
			}else{
				resmap.put("res", "1");
				resmap.put("msg", "参数不正确!");
			}
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}catch(Exception ex){
			logger.error(ex.getMessage());
			resmap.put("res", "1");
			resmap.put("msg", "获取债权转让列表接口失败!");
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}
		logger.info(result);
		serializeToJson(request, response, result);
		return null;
	}
	
	
	
	
	/**
	 * 用户资产
	 * @param 返回数据结果集
	 * @param response 相应请求给客户端
	 * @return 返回查询的数据
	 * @throws Exception
	 */
	@Autowired
	UserdzService userdzService;
	@RequestMapping("userdz_app")
	public String userdz_app(HttpServletRequest request,HttpServletResponse response) throws Exception{
		logger.info("userdz_app 初始化用户资产接口!!!");
		String content =  RequestUtils.getStringParameter(request, "content");
		Des des = new Des();//获取加密解密类
		JSONObject result = new JSONObject();//获取json
		Map<String,String> map = new HashMap<String,String>();
		Map<String,Object> resmap = new HashMap<String,Object>();
		try
		{
			String decodeContent = des.decrypt(content);
			String uContent = new String(decodeContent.getBytes(),"UTF-8");
			decodeContent = URLDecoder.decode(uContent, "UTF-8");
			logger.info("userdz_app decodeContent is : " + decodeContent);
			String[] contents = decodeContent.split("&");
			if(contents != null && contents.length > 0){
				map = this.getContentMap(decodeContent);
				logger.info("map decodeContent is : " + map.toString());
				JSONObject params = new JSONObject();
				String pageNum= map.get("pageNum");
				String pageSize= map.get("pageSize");
				
				int start=0;
				int limit=0;
				if (StringUtils.isNotEmpty(pageNum)&& StringUtils.isNotEmpty(pageSize)) {
					start=(Integer.valueOf(pageNum)-1)*Integer.valueOf(pageSize);
					limit=Integer.valueOf(pageSize);
				}
				params.put("start", start);
				params.put("limit", limit);
				params.put("gyh",map.get("gyh"));
				params.put("sjhm",map.get("sjhm"));
				List<Map<String, Object>> list =userdzService.queryUserdz(params);
				List<Map<String, Object>> list2=new ArrayList<>();
				int i=start+1;
				for (Map<String, Object> map2 : list) {
					map2.put("ORDER", i);
					list2.add(map2);
					i++;
				}
				int count =userdzService.getUserdzCount(params);
				resmap.put("data", list2);	
				resmap.put("total", count);
				resmap.put("res", "0");
				resmap.put("msg", "查询成功！");
			}else{
				resmap.put("res", "1");
				resmap.put("msg", "参数不正确!");
			}
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}catch(Exception ex){
			logger.error(ex.getMessage());
			resmap.put("res", "1");
			resmap.put("msg", "获取用户资产接口失败!");
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}
		logger.info(result);
		serializeToJson(request, response, result);
		return null;
	}
	
	

	/**
	 * app_权限列表
	 * @param 返回数据结果集
	 * @param response 相应请求给客户端
	 * @return 返回查询的数据
	 * @throws Exception
	 */

	@RequestMapping("approot_app")
	public String approot_app(HttpServletRequest request,HttpServletResponse response) throws Exception{
		logger.info("approot_app 初始化 app_权限列表接口!!!");
		String content =  RequestUtils.getStringParameter(request, "content");
		Des des = new Des();//获取加密解密类
		JSONObject result = new JSONObject();//获取json
		Map<String,String> map = new HashMap<String,String>();
		Map<String,Object> resmap = new HashMap<String,Object>();
		try
		{
			String decodeContent = des.decrypt(content);
			String uContent = new String(decodeContent.getBytes(),"UTF-8");
			decodeContent = URLDecoder.decode(uContent, "UTF-8");
			logger.info("approot_app decodeContent is : " + decodeContent);
			String[] contents = decodeContent.split("&");
			if(contents != null && contents.length > 0){
				map = this.getContentMap(decodeContent);
				logger.info("map decodeContent is : " + map.toString());
				JSONObject params = new JSONObject();
				String pageNum= map.get("pageNum");
				String pageSize= map.get("pageSize");
				
				int start=0;
				int limit=0;
				if (StringUtils.isNotEmpty(pageNum)&& StringUtils.isNotEmpty(pageSize)) {
					start=(Integer.valueOf(pageNum)-1)*Integer.valueOf(pageSize);
					limit=Integer.valueOf(pageSize);
				}
				params.put("start", start);
				params.put("limit", limit);
				params.put("yhm",  map.get("yhm"));
				params.put("xm",  map.get("xm"));
				List<Map<String, Object>> list =appRootService.queryapproot(params);
				List<Map<String, Object>> list2=new ArrayList<>();
				int i=start+1;
				for (Map<String, Object> map2 : list) {
					map2.put("ORDER", i);
					list2.add(map2);
					i++;
				}
				int count =appRootService.getAppRootCount(params);
				resmap.put("data", list2);	
				resmap.put("total", count);
				resmap.put("res", "0");
				resmap.put("msg", "查询成功！");
			}else{
				resmap.put("res", "1");
				resmap.put("msg", "参数不正确!");
			}
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}catch(Exception ex){
			logger.error(ex.getMessage());
			resmap.put("res", "1");
			resmap.put("msg", "获取 app_权限列表接口失败!");
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}
		logger.info(result);
		serializeToJson(request, response, result);
		return null;
	}
	
	
	
	
	

	/**
	 * 密保答案
	 * @param 返回数据结果集
	 * @param response 相应请求给客户端
	 * @return 返回查询的数据
	 * @throws Exception
	 */
	@Autowired
	private SecurityService securityService;
	@RequestMapping("mbanswer_app")
	public String mbanswer_app(HttpServletRequest request,HttpServletResponse response) throws Exception{
		logger.info("mbanswer_app 初始密保答案接口!!!");
		String content =  RequestUtils.getStringParameter(request, "content");
		Des des = new Des();//获取加密解密类
		JSONObject result = new JSONObject();//获取json
		Map<String,String> map = new HashMap<String,String>();
		Map<String,Object> resmap = new HashMap<String,Object>();
		try
		{
			String decodeContent = des.decrypt(content);
			String uContent = new String(decodeContent.getBytes(),"UTF-8");
			decodeContent = URLDecoder.decode(uContent, "UTF-8");
			logger.info("mbanswer_app decodeContent is : " + decodeContent);
			String[] contents = decodeContent.split("&");
			if(contents != null && contents.length > 0){
				map = this.getContentMap(decodeContent);
				logger.info("map decodeContent is : " + map.toString());
				JSONObject params = new JSONObject();
				String pageNum= map.get("pageNum");
				String pageSize= map.get("pageSize");
				
				int start=0;
				int limit=0;
				if (StringUtils.isNotEmpty(pageNum)&& StringUtils.isNotEmpty(pageSize)) {
					start=(Integer.valueOf(pageNum)-1)*Integer.valueOf(pageSize);
					limit=Integer.valueOf(pageSize);
				}
				params.put("start", start);
				params.put("limit", limit);
				params.put("username",map.get("username"));
				List<Map<String, Object>> list =securityService.searchSecuritylist(params);
				List<Map<String, Object>> list2=new ArrayList<>();
				int i=start+1;
				for (Map<String, Object> map2 : list) {
					map2.put("ORDER", i);
					list2.add(map2);
					i++;
				}
				int count =securityService.getSecurity(params);
				resmap.put("data", list2);	
				resmap.put("total", count);
				resmap.put("res", "0");
				resmap.put("msg", "查询成功！");
			}else{
				resmap.put("res", "1");
				resmap.put("msg", "参数不正确!");
			}
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}catch(Exception ex){
			logger.error(ex.getMessage());
			resmap.put("res", "1");
			resmap.put("msg", "获取密保答案接口失败!");
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}
		logger.info(result);
		serializeToJson(request, response, result);
		return null;
	}
	

	/**
	 *还款明细查询(项目)
	 * @param 返回数据结果集
	 * @param response 相应请求给客户端
	 * @return 返回查询的数据
	 * @throws Exception
	 */
	
	@Autowired
	private JhnxmService jhnxmService ;
	@RequestMapping("Hkmxxm_app")
	public String Hkmxxm_app(HttpServletRequest request,HttpServletResponse response) throws Exception{
		logger.info("Hkmxxm_app 初始化还款明细查询(项目)接口!!!");
		String content =  RequestUtils.getStringParameter(request, "content");
		Des des = new Des();//获取加密解密类
		JSONObject result = new JSONObject();//获取json
		Map<String,String> map = new HashMap<String,String>();
		Map<String,Object> resmap = new HashMap<String,Object>();
		try
		{
			String decodeContent = des.decrypt(content);
			String uContent = new String(decodeContent.getBytes(),"UTF-8");
			decodeContent = URLDecoder.decode(uContent, "UTF-8");
			logger.info("Hkmxxm_app decodeContent is : " + decodeContent);
			String[] contents = decodeContent.split("&");
			if(contents != null && contents.length > 0){
				map = this.getContentMap(decodeContent);
				logger.info("map decodeContent is : " + map.toString());
				JSONObject params = new JSONObject();
				String pageNum= map.get("pageNum");
				String pageSize= map.get("pageSize");
				
				int start=0;
				int limit=0;
				if (StringUtils.isNotEmpty(pageNum)&& StringUtils.isNotEmpty(pageSize)) {
					start=(Integer.valueOf(pageNum)-1)*Integer.valueOf(pageSize);
					limit=Integer.valueOf(pageSize);
				}
				params.put("start", start);
				params.put("limit", limit);
				params.put("startDate",  map.get("startDate"));
				params.put("endDate",  map.get("endDate"));
				params.put("cxmmc",map.get("cxmmc"));
				params.put("cfbr",map.get("cfbr"));
				params.put("cxmlx",map.get("cxmlx"));
				params.put("cxmzt",map.get("cxmzt"));
				List<Map<String, Object>> list =jhnxmService.queryJhnlbList(params);
				List<Map<String, Object>> list2=new ArrayList<>();
				int i=start+1;
				for (Map<String, Object> map2 : list) {
					map2.put("ORDER", i);
					list2.add(map2);
					i++;
				}
				int count =jhnxmService.getJhnlbCount(params);
				resmap.put("data", list2);	
				resmap.put("total", count);
				resmap.put("res", "0");
				resmap.put("msg", "查询成功！");
			}else{
				resmap.put("res", "1");
				resmap.put("msg", "参数不正确!");
			}
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}catch(Exception ex){
			logger.error(ex.getMessage());
			resmap.put("res", "1");
			resmap.put("msg", "获取还款明细查询(项目)接口失败!");
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}
		logger.info(result);
		serializeToJson(request, response, result);
		return null;
	}

	/**
	 *还款明细查询(单笔)
	 * @param 返回数据结果集
	 * @param response 相应请求给客户端
	 * @return 返回查询的数据
	 * @throws Exception
	 */
	
	@Autowired
	private JhnhkService jhnhkService;
	@RequestMapping("Hkmxdb_app")
	public String Hkmxdb_app(HttpServletRequest request,HttpServletResponse response) throws Exception{
		logger.info("Hkmxdb_app 初始化*还款明细查询(单笔)接口!!!");
		String content =  RequestUtils.getStringParameter(request, "content");
		Des des = new Des();//获取加密解密类
		JSONObject result = new JSONObject();//获取json
		Map<String,String> map = new HashMap<String,String>();
		Map<String,Object> resmap = new HashMap<String,Object>();
		try
		{
			String decodeContent = des.decrypt(content);
			String uContent = new String(decodeContent.getBytes(),"UTF-8");
			decodeContent = URLDecoder.decode(uContent, "UTF-8");
			logger.info("Hkmxdb_app decodeContent is : " + decodeContent);
			String[] contents = decodeContent.split("&");
			if(contents != null && contents.length > 0){
				map = this.getContentMap(decodeContent);
				logger.info("map decodeContent is : " + map.toString());
				JSONObject params = new JSONObject();
				String pageNum= map.get("pageNum");
				String pageSize= map.get("pageSize");
				
				int start=0;
				int limit=0;
				if (StringUtils.isNotEmpty(pageNum)&& StringUtils.isNotEmpty(pageSize)) {
					start=(Integer.valueOf(pageNum)-1)*Integer.valueOf(pageSize);
					limit=Integer.valueOf(pageSize);
				}
				params.put("start", start);
				params.put("limit", limit);
				params.put("startDate",  map.get("startDate"));
				params.put("endDate",  map.get("endDate"));
				params.put("q_xmmc",map.get("q_xmmc"));
				params.put("q_xmbh",map.get("q_xmbh"));
				params.put("q_zqmc",map.get("q_zqmc"));
				params.put("q_gyh",map.get("q_gyh"));
				params.put("q_hkzt",map.get("q_hkzt"));
				params.put("q_hkzl",map.get("q_hkzl"));
				List<Map<String, Object>> list =jhnhkService.queryJhnhkmxList(params);
				List<Map<String, Object>> list2=new ArrayList<>();
				int i=start+1;
				for (Map<String, Object> map2 : list) {
					map2.put("order", i);
					list2.add(map2);
					i++;
				}
				int count =jhnhkService.getJhnhkmxCount(params);
				resmap.put("data", list2);	
				resmap.put("total", count);
				resmap.put("res", "0");
				resmap.put("msg", "查询成功！");
			}else{
				resmap.put("res", "1");
				resmap.put("msg", "参数不正确!");
			}
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}catch(Exception ex){
			logger.error(ex.getMessage());
			resmap.put("res", "1");
			resmap.put("msg", "获取*还款明细查询(单笔)接口失败!");
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}
		logger.info(result);
		serializeToJson(request, response, result);
		return null;
	}

	/**
	 *红点宝投资信息查询
	 * @param 返回数据结果集
	 * @param response 相应请求给客户端
	 * @return 返回查询的数据
	 * @throws Exception
	 */
	
	@Autowired
	private P2PJhntzxiService p2pjhntzxiService;
	@RequestMapping("Hdbtzxi_app")
	public String Hdbtzxi_app(HttpServletRequest request,HttpServletResponse response) throws Exception{
		logger.info("Hdbtzxi_app 初始化红点宝投资信息查询接口!!!");
		String content =  RequestUtils.getStringParameter(request, "content");
		Des des = new Des();//获取加密解密类
		JSONObject result = new JSONObject();//获取json
		Map<String,String> map = new HashMap<String,String>();
		Map<String,Object> resmap = new HashMap<String,Object>();
		try
		{
			String decodeContent = des.decrypt(content);
			String uContent = new String(decodeContent.getBytes(),"UTF-8");
			decodeContent = URLDecoder.decode(uContent, "UTF-8");
			logger.info("Hdbtzxi_app decodeContent is : " + decodeContent);
			String[] contents = decodeContent.split("&");
			if(contents != null && contents.length > 0){
				map = this.getContentMap(decodeContent);
				logger.info("map decodeContent is : " + map.toString());
				JSONObject params = new JSONObject();
				String pageNum= map.get("pageNum");
				String pageSize= map.get("pageSize");
				
				int start=0;
				int limit=0;
				if (StringUtils.isNotEmpty(pageNum)&& StringUtils.isNotEmpty(pageSize)) {
					start=(Integer.valueOf(pageNum)-1)*Integer.valueOf(pageSize);
					limit=Integer.valueOf(pageSize);
				}
				params.put("start", start);
				params.put("limit", limit);
				params.put("TZSJ_START",  map.get("TZSJ_START"));
				params.put("TZSJ_END",  map.get("TZSJ_END"));
				params.put("userId",map.get("userId"));
				params.put("REF_XM_ORDER",map.get("REF_XM_ORDER"));
				params.put("HTBH",map.get("HTBH"));
				params.put("TZZT",map.get("TZZT"));
				params.put("HKZT",map.get("HKZT"));
				List<Map<String, Object>> list =p2pjhntzxiService.queryJhntzxi(params);
				List<Map<String, Object>> list2=new ArrayList<>();
				int i=start+1;
				for (Map<String, Object> map2 : list) {
					map2.put("ORDER", i);
					list2.add(map2);
					i++;
				}
				int count =p2pjhntzxiService.getPageCount(params);
				String sumJe=p2pjhntzxiService.getJhntzJe(params);
				resmap.put("sumJe", sumJe);	
				resmap.put("data", list2);	
				resmap.put("total", count);
				resmap.put("res", "0");
				resmap.put("msg", "查询成功！");
			}else{
				resmap.put("res", "1");
				resmap.put("msg", "参数不正确!");
			}
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}catch(Exception ex){
			logger.error(ex.getMessage());
			resmap.put("res", "1");
			resmap.put("msg", "获取红点宝投资信息查询接口失败!");
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}
		logger.info(result);
		serializeToJson(request, response, result);
		return null;
	}
	
	
	/**
	 *转让专区信息查询
	 * @param 返回数据结果集
	 * @param response 相应请求给客户端
	 * @return 返回查询的数据
	 * @throws Exception
	 */
	@Autowired
	private P2pWdzrService p2pWdzrService;
	@RequestMapping("Zrzqcx_app")
	public String Zrzqcx_app(HttpServletRequest request,HttpServletResponse response) throws Exception{
		logger.info("Zrzqcx_app 初始化转让专区信息查询接口!!!");
		String content =  RequestUtils.getStringParameter(request, "content");
		Des des = new Des();//获取加密解密类
		JSONObject result = new JSONObject();//获取json
		Map<String,String> map = new HashMap<String,String>();
		Map<String,Object> resmap = new HashMap<String,Object>();
		try
		{
			String decodeContent = des.decrypt(content);
			String uContent = new String(decodeContent.getBytes(),"UTF-8");
			decodeContent = URLDecoder.decode(uContent, "UTF-8");
			logger.info("Zrzqcx_app decodeContent is : " + decodeContent);
			String[] contents = decodeContent.split("&");
			if(contents != null && contents.length > 0){
				map = this.getContentMap(decodeContent);
				logger.info("map decodeContent is : " + map.toString());
				JSONObject params = new JSONObject();
				String pageNum= map.get("pageNum");
				String pageSize= map.get("pageSize");
				
				int start=0;
				int limit=0;
				if (StringUtils.isNotEmpty(pageNum)&& StringUtils.isNotEmpty(pageSize)) {
					start=(Integer.valueOf(pageNum)-1)*Integer.valueOf(pageSize);
					limit=Integer.valueOf(pageSize);
				}
				params.put("start", start);
				params.put("limit", limit);
				params.put("startDate",  map.get("startDate"));
				params.put("endDate",  map.get("endDate"));
				params.put("czrr",map.get("czrr"));
				params.put("czrzt",map.get("czrzt"));
				List<Map<String, Object>> list =p2pWdzrService.queryWdzrSqList(params);
				List<Map<String, Object>> list2=new ArrayList<>();
				int i=start+1;
				for (Map<String, Object> map2 : list) {
					map2.put("ORDER", i);
					list2.add(map2);
					i++;
				}
				int count =p2pWdzrService.getWdzrSqCount(params);
				resmap.put("data", list2);	
				resmap.put("total", count);
				resmap.put("res", "0");
				resmap.put("msg", "查询成功！");
			}else{
				resmap.put("res", "1");
				resmap.put("msg", "参数不正确!");
			}
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}catch(Exception ex){
			logger.error(ex.getMessage());
			resmap.put("res", "1");
			resmap.put("msg", "获取转让专区信息查询接口失败!");
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}
		logger.info(result);
		serializeToJson(request, response, result);
		return null;
	}
	
	/**
	 * 债权转让投资信息查询
	 * @param 返回数据结果集
	 * @param response 相应请求给客户端
	 * @return 返回查询的数据
	 * @throws Exception
	 */
	
	@RequestMapping("Zqzrtzcx_app")
	public String Zqzrtzcx_app(HttpServletRequest request,HttpServletResponse response) throws Exception{
		logger.info("Zqzrtzcx_app 初始化债权转让投资信息查询接口!!!");
		String content =  RequestUtils.getStringParameter(request, "content");
		Des des = new Des();//获取加密解密类
		JSONObject result = new JSONObject();//获取json
		Map<String,String> map = new HashMap<String,String>();
		Map<String,Object> resmap = new HashMap<String,Object>();
		try
		{
			String decodeContent = des.decrypt(content);
			String uContent = new String(decodeContent.getBytes(),"UTF-8");
			decodeContent = URLDecoder.decode(uContent, "UTF-8");
			logger.info("Zqzrtzcx_app decodeContent is : " + decodeContent);
			String[] contents = decodeContent.split("&");
			if(contents != null && contents.length > 0){
				map = this.getContentMap(decodeContent);
				logger.info("map decodeContent is : " + map.toString());
				JSONObject params = new JSONObject();
				String pageNum= map.get("pageNum");
				String pageSize= map.get("pageSize");
				
				int start=0;
				int limit=0;
				if (StringUtils.isNotEmpty(pageNum)&& StringUtils.isNotEmpty(pageSize)) {
					start=(Integer.valueOf(pageNum)-1)*Integer.valueOf(pageSize);
					limit=Integer.valueOf(pageSize);
				}
				params.put("start", start);
				params.put("limit", limit);
				params.put("userid",map.get("userid"));
				params.put("xmid",  map.get("xmid"));
				params.put("tzzt",  map.get("tzzt"));
				params.put("hkzt",map.get("hkzt"));
				params.put("htbh",map.get("htbh"));
				List<Map<String, Object>> list =p2pWdzrService.queryZrTzrxxList(params);
				List<Map<String, Object>> list2=new ArrayList<>();
				int i=start+1;
				for (Map<String, Object> map2 : list) {
					map2.put("ORDER", i);
					list2.add(map2);
					i++;
				}
				int count =p2pWdzrService.getZrTzrxxCount(params);
				resmap.put("data", list2);	
				resmap.put("total", count);
				resmap.put("res", "0");
				resmap.put("msg", "查询成功！");
			}else{
				resmap.put("res", "1");
				resmap.put("msg", "参数不正确!");
			}
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}catch(Exception ex){
			logger.error(ex.getMessage());
			resmap.put("res", "1");
			resmap.put("msg", "获取债权转让投资信息查询接口失败!");
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}
		logger.info(result);
		serializeToJson(request, response, result);
		return null;
	}
	
	
	/**
	 * 实名认证记录
	 * @param 返回数据结果集
	 * @param response 相应请求给客户端
	 * @return 返回查询的数据
	 * @throws Exception
	 */
	
	@Autowired
	private SmrzjlService smrzjlService; 
	@RequestMapping("Smrzjl_app")
	public String Smrzjl_app(HttpServletRequest request,HttpServletResponse response) throws Exception{
		logger.info("Smrzjl_app 初始化实名认证记录接口!!!");
		String content =  RequestUtils.getStringParameter(request, "content");
		Des des = new Des();//获取加密解密类
		JSONObject result = new JSONObject();//获取json
		Map<String,String> map = new HashMap<String,String>();
		Map<String,Object> resmap = new HashMap<String,Object>();
		try
		{
			String decodeContent = des.decrypt(content);
			String uContent = new String(decodeContent.getBytes(),"UTF-8");
			decodeContent = URLDecoder.decode(uContent, "UTF-8");
			logger.info("Smrzjl_app decodeContent is : " + decodeContent);
			String[] contents = decodeContent.split("&");
			if(contents != null && contents.length > 0){
				map = this.getContentMap(decodeContent);
				logger.info("map decodeContent is : " + map.toString());
				JSONObject params = new JSONObject();
				String pageNum= map.get("pageNum");
				String pageSize= map.get("pageSize");
				
				int start=0;
				int limit=0;
				if (StringUtils.isNotEmpty(pageNum)&& StringUtils.isNotEmpty(pageSize)) {
					start=(Integer.valueOf(pageNum)-1)*Integer.valueOf(pageSize);
					limit=Integer.valueOf(pageSize);
				}
				params.put("start", start);
				params.put("limit", limit);
				params.put("startDate",  map.get("startDate"));
				params.put("endDate",  map.get("endDate"));
				params.put("sjhm",map.get("sjhm"));
				params.put("username",map.get("username"));
				List<Map<String, Object>> list =smrzjlService.querySmrzjlList(params);
				List<Map<String, Object>> list2=new ArrayList<>();
				int i=start+1;
				for (Map<String, Object> map2 : list) {
					map2.put("ORDER", i);
					list2.add(map2);
					i++;
				}
				int count =smrzjlService.gettrzCount(params);
				resmap.put("data", list2);	
				resmap.put("total", count);
				resmap.put("res", "0");
				resmap.put("msg", "查询成功！");
			}else{
				resmap.put("res", "1");
				resmap.put("msg", "参数不正确!");
			}
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}catch(Exception ex){
			logger.error(ex.getMessage());
			resmap.put("res", "1");
			resmap.put("msg", "获取实名认证记录接口失败!");
			String jsonStr = JSONObject.fromObject(resmap).toString();
			logger.info(jsonStr);
			jsonStr = des.encrypt(jsonStr);
			result.put("result", jsonStr);
		}
		logger.info(result);
		serializeToJson(request, response, result);
		return null;
	}
	
	/**
	 * @param 返回实时数据结果集
	 * @param response 相应请求给客户端
	 * @return 返回查询的数据
	 * @throws Exception
	 */
@Autowired
TjbbService tjbbService;
@RequestMapping("TjbbZzMap_app")
public String TjbbZzMap_app(HttpServletRequest request,HttpServletResponse response) throws Exception{
	logger.info("TjbbZzMap_app 初始化平台统计报表接口!!!");
	String content =  RequestUtils.getStringParameter(request, "content");
	Des des = new Des();//获取加密解密类
	JSONObject result = new JSONObject();//获取json
	Map<String,String> map = new HashMap<String,String>();
	Map<String,Object> resmap = new HashMap<String,Object>();
	try{
		String decodeContent = des.decrypt(content);
		String uContent = new String(decodeContent.getBytes(),"UTF-8");
		decodeContent = URLDecoder.decode(uContent, "UTF-8");
		logger.info("TjbbZzMap_app decodeContent is : " + decodeContent);
		String[] contents = decodeContent.split("&");
		if(contents != null && contents.length > 0){
			map = this.getContentMap(decodeContent);
			String startDate=MapUtils.getString(map, "startDate");
			String endDate=MapUtils.getString(map, "endDate");
			resmap=tjbbService.queryTjbbZzMapSearch(startDate, endDate);
		}
		String jsonStr = JSONObject.fromObject(resmap).toString();
		logger.info(jsonStr);
		jsonStr = des.encrypt(jsonStr);
		result.put("result", jsonStr);
	}catch(Exception ex){
		logger.error(ex.getMessage());
		resmap.put("res", "1");
		resmap.put("msg", "获取平台统计报表接口失败!");
		String jsonStr = JSONObject.fromObject(resmap).toString();
		logger.info(jsonStr);
	}
	logger.info(result);
	serializeToJson(request, response, result);
	return null;
}
}

